v.import
GRASS Reference Manual
v.import NAME v.import - Converts ASCII Digital Line Graph (DLG) files, binary DLG files, and ASCII vector files into binary vector files and creates the needed vector support files. (GRASS Vector Program) SYNOPSIS v.import DESCRIPTION v.import is an interactive program which runs other vector import programs. It allows you to import DLG or ASCII vector files into GRASS vector format. It also runs v.support. No arguments are required on the command line. However, before running v.import, the user should move the ASCII DLG files to be imported into GRASS in a directory named dlg under the user's current GRASS mapset (i.e., under the directory known to GRASS as $LOCATION). If a dlg directory does not already exist under the user's current GRASS mapset, then the user will have to make one using the UNIX mkdir command, and then move the ASCII DLG files to be imported under that new dlg directory. This program performs all of the processes that are needed to convert ASCII Digital Line Graph (DLG) files, binary DLG files, and ASCII vector files into binary vector files. It also creates two support files, the dig_plus file and the dig_att file (only created when importing DLG files). The dig_plus file contains topological information obtained by analyzing the vector file. The dig_att file contains category (attribute) information files by the labeling function of the GRASS v.digit program. All of the above files must be run through v.import before they can be used in the v.digit program of GRASS 4.0. IMPORT FILES After entering the command v.import, the user will be asked for the type of file that is to be imported and for which support files will be created: Import to GRASS Vector Format and Create Needed Support Files 1 - ASCII DLG file to GRASS Vector Format 2 - Binary DLG file to GRASS Vector Format 3 - ASCII VECTOR file to GRASS Vector Format 4 - Binary VECTOR file to GRASS Vector Format If numbers 1-3 are chosen, v.import will respond with the current data base units (in feet or meters), and ask if the new vector file is in the correct units for the data base location. If the new vector file is not in the correct units, v.import will not allow it to be placed in the GRASS 5.0beta6 GRASS Development Team 1 v.import
GRASS Reference Manual
v.import current data base location. For each data base location, all map layers should have the same units. If, for some reason, a map layer uses different units than the rest of the map layers in the same data base location, a new data base location will have to be created for it. ASCII DLG File to GRASS Vector Format: Convert an ASCII DLG file (such as those created in GRASS 2.0) to a GRASS vector file and creates the dig_plus and dig_att support files. The user is asked two questions: 1. Determine if this map is composed of Area or Line information. Do you want to give precedence to Areas (opposed to Lines)? (y/n) [y] NOTE: Some machine-processed DLG files do not make the distinction between lines and area edges. For example, in a roads map, where the desired information is line data, a downtown block surrounded by roads may be processed as an area. Because of this, the user is asked to choose whether to give precedence to areas or lines. If precedence is given to lines, the user should be aware that any lines that bound unlabeled areas in the DLG file will be stored as line data. Any unlabeled areas would therefore be lost (this is only a concern when areas are unlabeled, labeled area information will be retained). If precedence is given to areas, lines will be stored as boundaries to areas that are unlabeled. 2. During the building of the Vector format: Do you want to snap nodes to other nodes within a threshold (y/n) [n] NOTE: BE CAREFUL! This threshold is calculated using the scale of the original DLG or dig file. If the threshold is too high, excessive snapping may occur, destroying the file. In general, users seldom need to snap nodes. If snapping of nodes is desired, the user may want to run v.support separately. v.support allows the user to set the snapping threshold. This process is done in three phases: 1. The ASCII DLG file is converted to a binary DLG file. 2. The binary DLG file is converted to a binary Vector file, and the dig_att support file containing attribute (category) information is created. 3. The dig_plus support file is created by analyzing the vector file for topological information. Binary DLG File to GRASS Vector Format: Converts binary DLG files (such as those created in GRASS 2 GRASS Development Team GRASS 5.0beta6 v.import
GRASS Reference Manual
v.import 2.0) to a vector file and creates the dig_plus and dig_att support files. The user is asked whether precedence should be given to Areas or Lines and if nodes should be snapped to other nodes within a calculated threshold. This process is done in two phases: 1. The binary dlg file is converted to a binary vector file, and the dig_att vector support file containing attribute information is created. 2. The dig_plus vector support file is created by analyzing the vector file for topological information. ASCII Vector file to GRASS Vector Format: Converts ASCII vector files (such as those created in GRASS 2.0) into GRASS binary vector files, and creates the dig_plus vector support file. Since a vector maintains the distinction between lines and area edges, the user is not asked to give precedence to either. However, the user will be asked if snapping from nodes to other nodes within a calculated threshold is desired. This process is done in two phases: 1. The ASCII vector file is converted to a binary vector file, and the dig_plus vector support file is created. 2. The dig_plus vector support file is created by analyzing the vector file for topological information. Binary Vector file to GRASS Vector Format: Creates the dig_plus vector support file. This process is done in one phase: 1. The dig_plus vector support file is created by analyzing the vector file for topological information. NOTES Before running v.import, the user should move the ASCII DLG files to be imported into GRASS in a directory named dlg under the user's current GRASS mapset (i.e., under the directory known to GRASS as $LOCATION). If a dlg directory does not already exist under the user's current GRASS mapset, then the user will have to make one using the UNIX mkdir command, and then move the ASCII DLG files to be imported under that new dlg directory. SEE ALSO v.digit, v.in.ascii, v.support AUTHORS Michael Higgins, U.S. Army Construction Engineering Research Laboratory GRASS 5.0beta6 GRASS Development Team 3 v.import
GRASS Reference Manual
v.import Dave Gerdes, U.S. Army Construction Engineering Research Laboratory 4 GRASS Development Team GRASS 5.0beta6