![]()
To facilitate the transition from GRASS GIS to ARC/INFO GIS, USACERL teamed with ESRI professionals to develop the AML and associated scripts found in Appendixes A and B on the accompanying CD-ROM.
The AML and associated scripts require both GRASS and ARC/INFO installed and executable from a single UNIX machine. This is necessary because the AML and associated scripts make calls to GRASS, ARC/INFO, and UNIX libraries. If the required configuration is not available at your site, you may go through the procedures in Appendix C, or contract the work out to someone who has the necessary tools available.
1. On a UNIX machine, change to the GRASS MAPSET directory containing the data you wish to convert.
2. Start ARC/INFO and create a workspace called arc, then quit ARC/INFO.
3. At the machine prompt type "setenv GISDBASE (your database directory)". Your GISDBASE is the directory that you type when entering GRASS on the DATABASE line.
4. Start GRASS, using the LOCATION and MAPSET that contains the data to be converted.
5. Remove all MASKS from the GRASS data you wish to convert.
6. Double check the current region (and resolution, if converting raster data), either set the region from the map to be converted or set to default, and exit GRASS.
7. Copy the AML file and the five associated .sh files from the CD-ROM into the arc directory of your MAPSET. The AML scripts must be in this directory since the GRASS programs are written to look for the arc directory in the MAPSET.
8. Start ARC/INFO.
9. Type pwd. If you are not in your /GRASSMAPSET/arc directory use the w command in ARC/INFO to get into the arc directory.
10. Start the conversion AML by typing: &run gras2arc.aml.
11. Pick the data type you wish to convert to ARC/INFO.
12. When prompted, enter the GRASS database directory. This is the same directory you entered previously as your GISDBASE. If you cannot remember the path, look up at the current variable settings, and the GISDBASE should be listed on your screen.
13. The AML will list which MAPSETs are available in this LOCATION. Choose the one you are currently in for best results.
14. The AML will ask if you own this MAPSET. If the answer is no, the AML may terminate due to UNIX directory ownership permission settings. If you do not own the MAPSET and do not have read or write permission in the directories, this AML will not execute. You may want to have root change ownership of the MAPSET, or use the GRASS commands to copy the data files you wish to convert into a MAPSET you own (you must exit ARC/INFO to copy the GRASS maps).
15. The AML will list the vector/raster/site files available in the MAPSET depending on which type of data layer you chose earlier. Enter the name of the file you wish to convert. (Note: You cannot convert raster data without having the Arc Grid module.)
16. If you are converting vector data, the AML will ask if this is a line or polygon coverage. Enter the type of data you wish to convert. If there are both lines and polygons in the coverage, choosing poly is the best option and the AML will build for both labeled lines and polygons when in ARC/INFO.
17. The AML will ask you for an ARC/INFO coverage name for the converted data. The AML will test to ensure the entered coverage name is a valid ARC/INFO file name, and will allow you to re-enter a name if an invalid file name is given.
18. The AML will now execute and create your coverage.
19. You may convert multiple coverages in a row. The scripts may "bail out" after repeated use in a single session. This may be overcome by exiting ARC/INFO and restarting ARC/INFO.
20. The AML may leave temporary files behind in the MAPSET/arc directory. These files can easily identified and deleted.
Data Conversion Basics
Always have a backup copy of your data before beginning any data conversion. In general, it is good practice to maintain a regular back-up schedule to recover data that may be lost under any circumstance.
Document everything you do. Documenting each step of the process not only allows you to reproduce the result later, but it also provides a record for error checking.
Make sure you have ample free disk space in the directory where the data conversion process will be performed. Some of the GRASS output files generated during conversion can be large and the resulting ARC/INFO coverages even larger.
For additional information on data conversion projects, we suggest reading GIS DATA CONVERSION, Strategies, Techniques and Management edited by Pat Hohl for Onword Press, 1998.
To do in GRASS
Take some time to preview the GRASS layer within the GRASS software. GRASS layers are ported out of the software one layer at a time and are then generated into ARC/INFO coverages. Upon completion of this process, check the newly generated ARC/INFO coverage for data conversion errors, data deletion, and for quality control/quality assurance measures. One good way to check the data conversion results is to make check plots within GRASS before converting the data, and compare with check plots made within ARC/INFO after the conversion is complete.
Quality Assurance/Quality Control
GRASS polygon or area layers generated into ARC/INFO coverages may need additional quality control. Many GRASS data layers created via a digitizer may have slivers, or small polygons that were not caught when the data was created, and were ignored by GRASS programs. Once the data is in ARC/INFO format, these polygons show up having a very small area, and no attributes. One easy way to determine if your data layer has slivers is to look at label errors. Once you have determined you have slivers, the easiest way to locate them is to view the data in ArcView. After the data is converted, export it to ArcView, look at the map table, do an incremental sort, and the unlabeled slivers will show up at the top of the table. You can use the zoom-to tool to find the slivers to be edited. When using ARC/INFO, a similar procedure may be done using ArcTools in the edit mode.
In ARC/INFO
Before beginning the process, design your ARC/INFO database. Define the workspace name and the contents of the workspace. Develop a data dictionary that will specify the contents of the workspace and determine the name of each coverage to be generated. Determine what attributes will be incorporated into each coverage and consider how the INFO files for each coverage will be used. This will help in defining the field name, type, width, number of decimal places, and the output format.
Projection information is vital to GIS data. Chances are the maps will not need to be re-projected as part of the conversion process. However, each coverage should include the prj.adf file that serves to document the projection. The prj.adf file can be created using ArcTools or with ARC/INFO commands.
If you wish to project your data using ArcView, remember it can only project from decimal degrees. If the data are properly projected before being viewed in ArcView, just set the units under view properties. It is easiest to project the data before export or transfer to ArcView since ArcView can only project from decimal degrees.
The conversion procedure outlined here does not create a bounding box for the converted coverages. The ARC/INFO command rebox can be used to create the bounding box for the coverage. The rebox command defines the bnd as the smallest area that will contain the all of the data in a coverage. The need for a coverage extent is described in Chapter 3.
To be able to use the ARC/INFO data in ArcView, or on another operating system, or for transport to another file system, you may wish to export the data. This can be done using the export cover or export grid commands in ARC/INFO. These commands will create a file with a .e00 extension (if multiple export files are created, they will have incremental extensions up to .e99).
The sizes of the fields in the INFO tables are part of the AML. If you find your attribute information is being truncated, use a UNIX editor to edit the character string length. The number of spaces in the character string length was kept small to save on storage space in the INFO directory. If you have more than one different theme of information as an attribute label, you may want to consider separating the information into various tables and use the ARC/INFO relates to link the information.
NOTE: The AML and associated scripts require both GRASS and ARC/INFO to be installed and executable, running on a single UNIX machine. This is necessary because the AML and associated scripts make calls to the GRASS, ARC/INFO and UNIX libraries.