PC-MOSS VERSION 1.0 USER AND PROGRAMMER DOCUMENTATION Prepared by GeoSpatial Solutions, Inc. 882 East Laurel Avenue Boulder, Colorado 80303 (303) 494-5017 Prepared for TGS Technology, Inc. Bureau of Land Management Operations Building 50, Mail Stop D-442 Denver Federal Center Denver, Colorado 80225 (303) 236-6492 and U.S. Department of the Interior Bureau of Land Management Division of Advanced Data Technology Building 50, Denver Service Center Denver Federal Center Denver, Colorado 80225-0047 (303) 236-0990 Oct. 10, 1987 TABLE OF CONTENTS DISCLAIMER.................................................3 PREFACE....................................................4 INTRODUCTION...............................................5 PC-MOSS USER DOCUMENTATION.................................6 PC-MOSS Commands......................................6 PC-MOSS Work and Master Directories...................7 Using PC-MOSS.........................................8 Example Data.........................................10 Known Limitations and Problems.......................10 Reporting Problems...................................10 PC-MOSS PROGRAMMER DOCUMENTATION.....................11 Software Distribution................................11 System Hardware Configuration........................11 Other Requirements...................................12 Installation.........................................13 GIS Directory Structure for DOS......................14 Software Development and Maintenance.................18 REFERENCES................................................20 APPENDIX 1 - PC-MOSS COMMAND DOCUMENTATION................21 DISCLAIMER Mention of trade names or commercial products does not constitute endorsement or recommendation for use by the government. No author or anyone acting on behalf of the software system assumes any liability or responsibility for damages (including consequential) caused by reliance on the materials presented, or from the use of any information, apparatus, or method of processing disclosed in this documentation. The right is reserved to make changes without notice in the specifications and materials contained herein. Every possible effort has been made to provide a high quality software product in PC-MOSS. However, BLM-DSC is not responsible for any problem which may arise through the use of this product. Problems should be reported to BLM-DSC using the procedures detailed in the Reporting Problems portion of this manual. PREFACE The PC-MOSS User and Programmer Documentation has been designed as a reference document for trained users of the Map Overlay and Statistical System (MOSS) interactive graphics software. MOSS is the data analysis component of a Geographic Information System (GIS) originally developed by the Western Energy and Land Use Team (WELUT). Curently, MOSS is being developed under the direction of the U.S. Bureau of Land Management with cooperation from the U.S. Fish and Wildlife Service, the U.S. Bureau of Indian Affairs, the U.S. Geological Survey, the U.S. Forest Service, the Soil Conservation Service, the Minerals Management Service and the U.S. Army Coprs of Engineers. This document, in combination with the MOSS User's Manual, contains information necessary for a user to access and use the PC-MOSS software. It is assumed that the reader of this document is familiar with the GIS and its applications. Specifically, it is assumed that the reader has digital data available and has access to the PC-MOSS software and accessory hardware. This manual is not a detailed systems reference document. Those totally unfamiliar with MOSS and the GIS should contact: Bureau of Land Management Division of Advanced Data Technology Branch of Technology Applications and Assistance Building 50, Denver Federal Center P.O. Box 25047 Denver, Colorado 80225-0047 Phone FTS: 776-0990 Comm: 303-236-0990 INTRODUCTION The Bureau of Land Managements (BLM) Denver Service Center (DSC) has developed a Personal Computer (PC) based version of the Map Overlay and Statistical System (MOSS) in response to a need expressed by the U.S. Army Corp of Engineers. Current technology for single user computers permits cost effective access to Geographic Information Systems (GIS) technology in organizations which previously might not have justified the cost of a GIS approach to mapping. In addition, the use of inexpensive technology may prove useful as front-end workstations in organizations which operate minicomputer based GIS. This manual describes PC-MOSS, a subset of the MOSS vector commands which users have come to know on Data General computers. This manual is not intended to replace the standard MOSS command reference used with the Data General version of MOSS. It is intended to be used with that reference and to describe the differences between PC-MOSS and Data General MOSS. The standard MOSS command reference is remains the source of detailed information regarding specific MOSS and PC-MOSS commands. MOSS is typically utilized as part of complete GIS which includes other capabilities such as data entry (Automated Digitizing Systems, ADS), raster data processing (Map Analysis Package, MAP), and cartographic output (Cartographic Output Systems, COS). MOSS, and PC-MOSS in particular, represents only one element of a GIS. The elements of map digitizing and map plotting are not provided in the current PC-MOSS. However, PC-MOSS is accessed via a front-end called GIS which contains options which are currently not available. These options may be available in the future as demand requires and resources permit. At present only MOSS is available. Although the lack of a direct capability for map digitizing, projection changes, and cartographic output constitutes a limitation to the use of PC-MOSS, the MOSS IMPORT command is available in PC-MOSS and provides one mechanism for entering map data into the system. Data from other PC based digitizing programs could be converted to the MOSS IMPORT format for use in MOSS. Any data transfer capability between a minicomputer running MOSS and a PC running PC-MOSS would permit transfer via the IMPORT format. A tape drive interface for the PC or a serial communications link would provide the necessary capability. Unfortunately, the MOSS EXPORT command is not available in PC-MOSS. This precludes such a simple approach to moving MOSS data into other PC systems (such as CAD systems) for cartographic output. The map projection software is also not available in PC-MOSS. This limits PC-MOSS in the area of cartographic manipulations. In summary, the current version of PC-MOSS was developed to address a particular need and has limitations which preclude its use a stand-alone, full-function GIS. Future developments may address these limitations. PC-MOSS USER DOCUMENTATION The following sections are provided to give the user of PC-MOSS an overview of the system and its capabilities. Refer to the standard MOSS command reference for details regarding specific MOSS commands. PC-MOSS Commands PC-MOSS Version 1.0 provides a subset of the MOSS vector processing commands in the PC environment. PC-MOSS offers approximately 40 of the MOSS vector data processing commands users are familiar with from the Data General environment. These are the only capabilities available at this time. The following specific MOSS vector data processing commands are currently available in PC-MOSS: PC-MOSS VERSION 1.0 COMMANDS ACTIVE AREA ATTRIBUTE ATTDESCR AUDIT BSEARCH BUFFER COMPUTE DATABTEST DELETE DEVICE DISTANCE ERASE EXIT FREE FREQUENCY GENERATE IMPORT HELP LEGEND LENGTH LIST LPOVER MERGE NUMBER OPEN OVERLAY RESOLVE PERIMETER PLOT PROXIMITY QUERY REPORT RESET SAVE SELECT SHADE SIZE STATUS SUB2AT SUBEDIT WINDOW ZOOM The function of each of these commands is listed below: COMMAND FUNCTION ACTIVE List active maps AREA Produce table of areas ATTRIBUTE List/modify multiple attribute file ATTDESCR Build multiple attribute batch file AUDIT Audit details of map features BUFFER Generate buffers around map data COMPUTE Perform mathematics on attributes DATABTEST List modify map names file DELETE Delete maps DEVICE Change graphics output device DISTANCE Measure distance between points ERASE Clear display screen FREE Deactivate a map FREQUENCY Frequency by subject GENERATE Create map interactively IMPORT Create map from ADDWAMS format file HELP User documentation LEGEND Display attributes, map name, scale LENGTH Display lengths for line maps LIST Browse available map names LPOVER Overlay polygon and point or line maps MERGE Join adjacent maps NUMBER Plot map feature numbers, areas OPEN Access master projects OVERLAY Logical intersection of of two maps RESOLVE Resolve overlaps created by BUFFER PERIMETER Perimeter report for polygon maps PLOT Display a map PROXIMITY Display data in or out of proximity QUERY Identify subject, item for features REPORT Report from multiple attribute database RESET Reset display window SAVE Save map SELECT Retrieve a map and make it active SHADE Display map with cross-hatching SIZE Select features of specified size STATUS Report on current session SUB2AT Generate multiple attribute input SUBEDIT Edit map subjects WINDOW Initiate a viewing window ZOOM Magnify portion of display window PC-MOSS Work and Master Directories The directory structures for PC-MOSS differ from those for Data General MOSS. PC-MOSS can be executed with no master directory available. The software creates a separate .DT file for each project (PROJECT.DT). The POLYGON.DT file is no longer used. The user creates a new project by executing the OPEN command in PC-MOSS. The OPEN command will prompt for a project name. The OPEN command should be used immediately upon creating a new PC-MOSS directory. This is only manner in which a project catalog (PROJECT.DT) can be created. When a project name is specified using the OPEN command, that project remains active after leaving MOSS. When MOSS is executed again the last project Opened is the current project. Thus the Data General RESTART command no longer applies. By default PC-MOSS is always invoked in RESTART mode. The user can change projects by using the OPEN command or by placing a valid project name as the first argument of a new command line. For example: WOLSAG SEL MDRWOLFR ALL If a master directory is used for a project, it must reside in a DOS directory of the same name as the project. A master directory must contain only one .DT file called MASTER.DT. PC-MOSS also retains the name of the directory which holds the .DT files. This difference between PC-MOSS and Data General MOSS permits PC-MOSS to distinguish between master and work directories. Master and work directories must be immediately below the system (DOS) root (/) directory. Using PC-MOSS To access PC-MOSS must first execute the GIS front-end. This is done by typing the command: GIS from the directory the user would like to work in. This command will only work if the C:/GIS/EXE has been placed in the system PATH command. This command will display a menu of several options. Each menu option has a number associated with it. The option name or number is used to indicate which option is desired. If the option name is used in selecting the option, only enough characters to make the option unique need to be typed. For example, PC-MOSS can be selected by typing: 6 or by typing: MO The first three menu selections for all menus are the same. They are Exit, Help, and Menu on/off. The Exit selection will either return the program to a previous menu or exit from GIS. The Help selection functions as it does for Data General MOSS. The command HELP followed by a PC-MOSS command name will display help for that command. For example: HELP PLOT will display help information for the PC-MOSS command PLOT. The Menu on/off selection is a toggle switch which allows the user to control if the menu selections are displayed (on) or not displayed (off) each time the front-end is waiting for a user selection. While in PC-MOSS, a lengthy list of commands is displayed if the Menu on/off option is switched on. As the user becomes more familiar with the available commands, it will be more convenient to switch the Menu on/off selection to off. The main menu for the GIS front-end will always appear. Sub-menus are off by default. The user must type: 3 or type: M or type: ME to toggle the menu on. Once the user is in PC-MOSS, it is used in the same manner as Data General MOSS. PC-MOSS will automatically be in the RESTART mode unless this is the first time the user has executed PC-MOSS from the current directory. Whenever PC-MOSS is executed, the user is informed of which project is the current project. If a different project is desired, the user must use the OPEN command to specify that project. The OPEN command is used to create project catalogs. When a project name is specified using the OPEN command, that project remains active after leaving PC-MOSS. When MOSS is executed again, the last project OPENed becomes the current project. Thus the Data General MOSS RESTART command no longer applies. By default, PC-MOSS is always invoked in RESTART mode. The user changes projects by using the OPEN command or by placing a valid project name as the first parameter of a new command line. As each PC-MOSS completes execution, the program informs the user that it is returning to MOSS. The MOSS prompt then reappears: MOSS-=>? The user may then execute another PC-MOSS command or exit to the main GIS menu by typing: EXIT Example Data There are three EXPORT format files provided for use in the installation and initial testing and familiarization with PC-MOSS. They are: MDRWOLF (5 polygons) MDMWOLF (3 lines) SGWWOLF (3 polygons) The PC-MOSS command IMPORT is used to create usable PC-MOSS maps from these files. Known Limitations and Problems PC-MOSS has the following known limitations and problems beyond those documented in the standard MOSS command reference. PC-MOSS does not use disk arrays to handle coordinates. This speeds up the processing of coordinates considerably. However, it defines a limitation of no more than 5000 points per feature. In later releases this limit may be 10000. The TIC option in PLOT and the GEOG option in ZOOM have not been implemented. Implementing these capabilities will require the port of much more MOSS code to the PC. The use of symbols in the PLOT command has not been implemented due to difficulty in exporting the HSYMB file. Reporting Problems Software problems can be reported using the following procedure: Describe the problem(s) in an ASCII text file called PROBLEMS.DOC. This file should also contain the reporters name, address, and telephone number. Copy the map(s), PROJECT.DT, DESCRIBE.FA, and the PROBLEMS.DOC files to a floppy disk and mail them to: CAROL WILSON BLM-DSC BUILDING 40, D-155 DENVER, CO 80225 An attempt will be made to duplicate the problem as documented. If possible, any such problems will be fixed and the fixes released in subsequent versions of PC-MOSS. If the bug cannot be duplicated at BLM-DSC, no further action will be taken. PC-MOSS PROGRAMMER DOCUMENTATION This section describes PC-MOSS for the benefit of programmers who will be maintaining, developing, and enhancing the system. The manual describes software tools which have been developed to assist in routine software development tasks. The manual also describes the directory structure used in the DOS environment for software development of PC-MOSS. Finally, the manual details the FORTRAN coding conventions which have been established to assure consistency throughout the PC-MOSS source code. The manual is intended to be used along with the PC-MOSS User Manual and the MOSS Manual to provide a complete description of the PC-MOSS system. Software Distribution The executable files for PC-MOSS require approximately 5 megabytes of disk space. The distribution of PC-MOSS on 360 kbyte diskettes requires approximately 15 diskettes. Distribution on 1.2 megabyte diskettes requires approximately 5 diskettes. System Hardware Configuration Although running PC-MOSS requires a PC hardware configuration beyond that typically used for office automation, the requirements are similar to that used in many technical fields using PC technology. The minimum hardware configuration for PC-MOSS is as follows: IBM compatible PC/XT 640 kb Memory XXX87 Math Coprocessor 360 kb Floppy disk drive 20 mb fixed disk 600 X 200 graphics card and monitor (color or mono) In the interest of increased processing speeds and higher quality graphics a preferred hardware configuration is as follows: IBM compatible PC/AT (8 MHz or faster) 640 kb Memory XXX87 Math Coprocessor 1.2 mb Floppy disk drive 40 mb fixed disk 750 X 350 Hercules compatible card and monochrome monitor The executables for PC-MOSS occupy approximately 5 mb of fixed disk space. Users of PC-MOSS should give due consideration to their data space requirements before deciding on an appropriate fixed disk capacity. Other Requirements In addition to an appropriate version of DOS, running PC-MOSS requires a Tektronix graphics terminal compatible device driver for the PC. Such software interprets all instructions being written to the PC console. When these instructions can be interpreted as Tektronix instructions, the console is put into Tektronix graphics terminal emulation mode. Tektronix PLOT10 instructions are correctly interpreted and the appropriate vectors drawn on the console screen. Use of such software enables MOSS software to be moved to the PC environment without changes to the graphics output routines. This simplifies the conversion process and minimizes changes required to the minicomputer versions, thus simplifying the task of software maintenance on a variety of computer architectures. A graphics device driver which emulates a Tektronix graphics terminals required for PC-MOSS to correctly display graphics. BLM-DSC has performed this development and testing work using a software product called PLOTDEV. PLOTDEV is available for $40.00 from Microplot Systems Co. 659-H Park Meadow Road Westerville, Ohio 43081 (614) 882-4786 VISA or MASTERCARD orders can be placed at: 1-800-338-0333 Use the touch tone to enter the identification code: 766-8501 Or wait for operator assistance. PLOTDEV can be configured for a variety of screens. It's installation procedure includes a series of questions about the system on which it is being installed. The questions address the type of display screen, display mode (4010), printer, VT-640 mode (off), PC (IBM), DOS Edit Capability (enabled), and screen print (enabled). Other Tektronix 4010 emulation device drivers for the PC can be used although none have been specifically tested by BLM-DSC. The requirement is that the device driver be memory resident and must intercept anything DOS send to the screen which can be interpreted to be Tektronix 4010 instructions. PC-MOSS makes no other provision for graphics display to the screen other than sending Tektronix 4010 instructions. At this time the only peripheral support provided by PC-MOSS is printer and graphics peripheral support provided by the Tektronix device driver software. Some such software will support dot matrix printers as graphics devices; others will also support desktop plotters. All graphical output from PC-MOSS at this time is in the form of screen dumps from the console screen. PC-MOSS was developed using IBM Professional FORTRAN 77 (Ryan-McFarland FORTRAN 77). This compiler offers the features to make porting from the minicomputer environment possible. The compiler requires use of an XXX87 math coprocessor. The GIS front-end/user-interface is written in Microsoft FORTRAN rather than IBM Professional FORTRAN 77. This permitted the development of individual PC-MOSS commands as separate executables which can be spawned processes from the Microsoft FORTRAN driver. This has advantages from both the developmental and applications perspectives of PC-MOSS. Installation PC-MOSS will be distributed with an installation program which prompts the user for diskettes by number. On 360k diskettes PC-MOSS is distributed on approximately 19 sequentially numbered diskettes. On 1.2m diskettes PC-MOSS is distributed on approximately 7 sequentially numbered diskettes. The installation program will create a subdirectory immediately below the root directory on the system's C: hard disk drive. This new directory will be called /GIS. The installation program will also create three subdirectories to /GIS called EXE, HELP, and INTRFACE. These directories will hold the files required to run PC-MOSS. PC-MOSS is installed as follows: Insert disk # 1 into diskette drive A: and type the command: A:CopyMoss This will begin the installation process. PC-MOSS for 360 k disk drives is distributed on 19 diskettes. These diskettes are sequentially numbered. The first of these diskettes contains an installation program. After the fifteenth diskette has been loaded the program prompts for the BUFFER backup diskette # 1. The DOS RESTORE command will then prompt for diskette # 2. The loading program will then prompt for diskette # 18. This process requires careful attention since it can easily become a point of confusion during the loading process. PC-MOSS for 1.2 M disk drives is distributed on 7 diskettes. These diskettes are also sequentially numbered. The first of these diskettes contains a installation program. Instructions are provided by the installation program. After the installation program has completed loading all of the require files, a modification must be made to the PATH command which is typically found in the systems AUTOEXEC.BAT file under the root (/) directory. The directory: C:/GIS/EXE must be added to the PATH command. This indicates to DOS where the PC-MOSS executable files are located, and thus makes PC-MOSS conveniently available to the user. Placing this directory near the beginning of the PATH command will help provide quick access by the user to PC-MOSS. This addition to the PATH command in the AUTOEXEC.BAT file is required for PC-MOSS to execute. GIS Directory Structure for DOS The PC-MOSS directory structure differs from the Data General MOSS directory structure. PC-MOSS can be executed with no master directory. PC-MOSS creates a separate .DT file for each project (PROJECTNAME.DT). The POLYGON.DT file is no longer used. The user creates a new project by executing the OPEN command within PC-MOSS. The OPEN command then prompts for a project name. To create a project catalog (PROJECTNAME.DT), the OPEN command should be used immediately upon creating a new PC-MOSS directory. If a master directory is used for a project, it must reside in a DOS directory of the same name as the project. A master directory must contain only one .DT file called MASTER.DT. PC-MOSS also retains the name of the directory which holds .DT files. This difference permits PC-MOSS to distinguish between master and work directories. Master and work directories must be immediately below the system (DOS) root (/) directory. The directory structure used for PC-MOSS is described as follows: PC-MOSS VERSION 1.0 DIRECTORY STRUCTURE DIRECTORY NAME DIRECTORY CONTENTS /GIS The PC-MOSS system /GIS/SRC Final FORTRAN 77 Source Code /GIS/OBJ Object Modules /GIS/EXE Executable Modules /GIS/LNK Link Modules /GIS/UTL Utility Command Files /GIS/LST Compiler Listings /GIS/TEST Test Data Files and .DT Files /GIS/TEK Tektronix Routines /GIS/DEV Developmental Source Code /GIS/HELP User Help Files /GIS/INTRFACE User Interface Routines /GIS The software for the entire PC-MOSS system resides in subdirectories to this directory. By default it resides on the C: disk drive immediately under the root (/) directory. /GIS/SRC This directory contains the final source code used for operational application of the PC-MOSS system. Source is not placed in this directory until developmental work is completed. Source code files are placed in this directory by the system manager. /GIS/OBJ This directory contains the object modules for the entire PC-MOSS system. The result of the most recent (either developmental or operational) compilation is placed in this directory automaically by the compile command file used by the programmer. /GIS/EXE All of the executable files for the PC-MOSS system reside in this directory. The result of the most recent (either developmental or operational) linking is placed in this directory automatically by the link command file used by the programmer. /GIS/LNK This directory contains text files, one per PC-MOSS command, which list the required externals needed during linking. These files are placed in this directory by the programmer. For new command being added to PC-MOSS, a new link file must be created. This is accomplished via use of the MAKETREE program which is found in the /GIS/UTL directory. This program will construct a file listing all of the calls made by a command. This raw list can be formatted for use during linking with a text editor. Software developers should use the existing .LNK files for examples the specific format required for these link files. /GIS/UTL A set of software tools for use in the development and maintenance of PC-MOSS was also developed. These tools consist of DOS .BAT command files which simplify the tasks frequently done during software development. Two major areas in which these tools are used is in file management and in the compilation and linking process. Such simple tools greatly assist the programmer in the accomplishment of routine tasks. In addition, another software tool provides information regarding the dependencies among the various MOSS software modules. This information makes the compilation and linking processes easier to manage. The following provides a list and brief description of each of the command files found in the UTL directory. COMMAND FILE FUNCTION BACKOBJ.BAT Back up object code BACKOTH.BAT Back up UTL, INTRFACE, HELP, and LNK BACKSRC.BAT Back up source code BAKWIPE.BAT Delete .BAK files from source code C.BAT Compile source and move object code CI.BAT Compile with Microsoft FORTRAN COPYMOSS.BAT Install low density distribution on disk DEV.BAT CD to /GIS/DEV DOC.BAT CD to /GIS/DOC EXE.BAT CD to /GIS/EXE HIGHMOSS.BAT Make high density distribution HLP.BAT Back up help files to diskette INTR.BAT CD to /GIS/INTRFACE L.BAT Link object code LI.BAT Link using Microsoft FORTRAN LINKALL.BAT Link entire PC-MOSS system LINKER.BAT Link all commands LM.BAT ? LNK.BAT CD to /GIS/LNK LOWMOSS.BAT Make low density distribution LST.BAT CD to /GIS/LST MAKETREE.COM Find external dependencies for a file MAKETREE.PAS Find external dependencies for a file MOSSCOPY.BAT Install high density distribution MOSSHIGH.BAT Install high density distribution MOSSLOW.BAT Make low density backup of PC-MOSS OBJ.BAT CD to /GIS/OBJ Display a compiler listing to the screen PUSH.BAT CD to /GIS SRC.BAT CD to /GIS/SRC T.BAT Compile with debugger TEK.BAT CD to /GIS/TEK TEST.BAT CD to /GIS/TEST TRY1.BAT Create backup of help files TST.BAT CD to /GIS/TST UTL.BAT CD to /GIS/UTL The UTL directory holds a number of .BAT files useful for conveniently managing the files associated with PC-MOSS and permitting common software development tasks to be performed with single commands. The program MAKETREE searches FORTRAN source code files such as those found in SRC, TEK, and DEV and creates a lists of dependencies for all externals required. C.BAT is a command file used to compile FORTRAN source code files. The .FOR extension to the file name is not required when using this command file. The command file automatically puts the object code file in /GIS/OBJ and deletes it from /GIS/DEV. The command file assumes you are in /GIS/DEV. The command file creates a compiler listing containing line numbers and places this file in /GIS/LST with the name A.LST. This file can be viewed with a text editor to find the details of any compiler errors. T.BAT performs the same function as C.BAT but also uses the IBM Professional FORTRAN /T switch which invokes the debugger. The listing file created is called FILENAME.LST. L.BAT is link command file. It link a commands object code file with all required externals using the link dependencies found in the /LNK directory. /GIS/LST This directory contains the compiler listing from the most recent compile. It is in a file named A.LST. This file is placed into this directory automatically by the command file used by the programmer to perform the compile. If errors are reported to the screen at the time of compile, the A.LST file can be viewed with a text editor to find the specific location and nature of the errors. /GIS/TEST This directory contains test maps and .DT files for use in the process of software development and testing. These files are provided as part of the software distribution. /GIS/TEK This directory contains the source code files for driving a Tektronic device. These files are provided as part of the software distribution for software development. /GIS/DEV This directory contains the source code files for those commands under development or modification. It is for developmental purposes. New source code is written in this directory and existing commands requiring modification are copied from /GIS/SRC in to this directory for modfication to separate operational from developmental source code files. After completion of a developmental effort, the source code is moved from /GIS/DEV to /GIS/SRC. /GIS/HELP This directory contains the user help files for the PC-MOSS commands. This files are accessed by the PC-MOSS HELP command. There is one help file associated with each PC-MOSS command. There is easily recognizable correspondence between the PC-MOSS command and the associated help file. /GIS/INTRFACE This front-end library for the GIS software is written in Microsoft FORTRAN rather than IBM Professional FORTRAN. This permits the development of individual MOSS commands as separate executables which can be spawned processes from the Microsoft FORTRAN driver. This has advantages for both development and use of the system. This directory has it's own C.BAT (compile) command file. Software Development and Maintenance Software development and maintenance for PC-MOSS utilizes the directory structure and utilities described above to provide a simple and convenient means for accomplishing most routine tasks. A brief description of the sequence of steps involved in developing a new PC-MOSS command or modifying and existing PC-MOSS command will permit easy use of these capabilities. Software under development is placed in the /GIS/DEV directory. For new software this means it will written in the /GIS/DEV directory. For existing PC-MOSS command which are being modified, the required files will be copied from the /GIS/SRC directory, where all operational source code for PC-MOSS resides, to /GIS/DEV, where all development source code for PC-MOSS resides. The source code in /GIS/DEV is worked upon as required with a text editor of choice. The command files in the /GIS/UTL directory play a critical role in the software development process and can be conveniently accessed as needed by placing the /GIS/UTL directory in the system path list. When the source code is ready to be compiled and tested, the compiler is invoked using the C.BAT command file found in the /GIS/UTL directory. This command is used as follow: C FILENAME where FILENAME is the source code file name to be compiled. Note that the .FOR extension is not used when invoking the C command file. Using this command will execute the IBM Professional FORTRAN compiler on the file specified. The compilation will result in the number of errors and warnings being reported to the screen and a complete compiler listing being placed into the file /GIS/LST/A.LST. This listing file can be viewed with a text editor if errors have been found to determine the specific nature of the errors. The compilation command file also places the resultant object code file (.OBJ) into the /GIS/OBJ directory for later use in linking the software. This process in repeated for any source code files requiring development or modification for the command being worked on. When all of the required source code files have been successfully compiled the linking process can be undertaken. The software for a particular command is linked into an executable file by invoking the L.BAT command file found in the /GIS/UTL directory. This command links all of the required ocject files for the specified command from the /GIS/OBJ directory. Any link errors such as those resulting from unresolved externals will be reported directly to the screen. The result of running the L.BAT command file without error is that an executable file for that command is placed in the /GIS/EXE directory. The L.BAT command file is invoked as follows: L FILENAME where FILENAME is the commnd name. Note that no filename extension is used. REFERENCES MOSS User's Manual, Version 8509. Bureau of Land Management, Division of Advanced Data Technology, Building 50, Denver Federal Center, P.O. Box 25047, Denver, Colorado 80225-0047 and Western Energy and Land Use Team, Division of Biological Services, Research and Development, Fish and Wildlife Service, U.S. Deparment of the Interior, Washington, D.C. 20240. 1985. APPENDIX 1 PC-MOSS COMMAND DOCUMENTATION BUFFER The BUFFER command is summarized as follows: BUFFER is a distance analysis command that generates a buffer (i.e., a zone of influence) of user-specified distance around any map data referenced in the active map table. BUFFER will draw zones of in- fluence around points (e.g., a ferret sighting), lines (e.g.,a road), or polygons (e.g., a city). Result of the command is a polygon map that is saved as part of the workfile. Since the buffer generation process may create overlapping polygons, the user of BUFFER may need to use the RESOLVE command to resolve these overlaps. The BUFFER command is specified as follows: (* denotes parameters which can only be entered in a prompted mode) BUFFER (active ID) (new map name) (radius) (buffer type) The individual parameters of the BUFFER command are described below: (active ID) is the ID number of a point, line, or polygon map referenced in the active map table. (new map name) is the name for the map resulting from BUFFER. (radius) is the desired width or radius of the buffer zone in miles. The following is an example of use of the BUFFER command: ENTER COMMAND ? BUFFER PLEASE ENTER ACTIVE MAP ID.S TO BUFFER ? 1 WHAT DO YOU WISH TO CALL THE NEW MAP __________ ? SWSBUFFER PLEASE ENTER BUFFER ZONE IN MILES ? .025 ... Building BUFFER zones .... PROCESSING FEATURE 1 BUILD MOSS MAP DATA TYPE = 3 TOTAL TIME = 1.86 TOTAL RECORDS = 144.00 TOTAL JOB COST =$ .02 ENTER COMMAND The limitations of the BUFFER command are as follows: -- Buffer may produce erroneous results on "dirty" data; i.e.; lines with duplicate points or selfcrossing loops. -- Input map must be an active vector map with window set. -- Input map must have less than 750 points per feature or less than 250 points per feature when resolving overlaps. -- May not function well with a large radius (e.g., > 1 mile). RESOLVE The RESOLVE command is summarized as follows: The RESOLVE command is used to resolve overlapping polygons developed by the BUFFER command. Clusters of overlapping features are identified and a polygon overlay OR (union) process is initiated. RESOLVE willexecute for at least as long as the BUFFER command executed in creating the map. The RESOLVE command is specified as follows: (* denotes parameters which can only be entered in a prompted mode) RESOLVE (active ID 1) (active ID 2) (buffer size) (new map name) The individual parameters of the RESOLVE command are described below: (active ID 1) is the ID number of the point, line, or polygon map referenced in the active map table and used by BUFFER to create the map with overlapping polygons. (active ID 2) is the ID number of the polygon map produced by BUFFER. This map is the map containing overlapping polygons to be resolved. (buffer size) is a buffer size as big or bigger than the buffer size specified in BUFFER to produce the map with overlapping polygons. (new map name) is the name for the map produced by RESOLVE. The following is an example of use of the RESOLVE command: ENTER COMMAND ? RESOLVE PLEASE ENTER ACTIVE MAP ID.S TO RESOLVE FIRST ID IS THE ORIGINAL MAP, SECOND ID IS THE BUFFERED MAP ? 1,2 PLEASE ENTER BUFFER ZONE IN PROPER UNITS ? 1.0 ENTER MAP NAME FOR THE RESOLVED MAP: __________ ? SWSRESOLVE BUILD MOSS MAP DATA TYPE = 3 ENTER COMMAND The limitations of the RESOLVE command are as follows: -- First input map must be the map used by BUFFER. -- Second input map must be an active polygon map with window set. -- Cannot resolve overlaps on data with different subjects. -- Polygons in addition to the minimum required to encompass buffered areas are sometimes generated. Usually, the first 'n' items (where 'n' is the number of overlaps to be resolved) will include all the items necessary to show the buffered areas. Other items may be discarded.