.TH v.in.dxf .SH NAME \fIv.in.dxf\fR \- Converts files in DXF format to ASCII or binary GRASS vector file format. .br .I "(GRASS Vector Data Import Program)" .SH SYNOPSIS .B v.in.dxf .br .B v.in.dxf help .br \fBv.in.dxf\fR [\fB\-a\fR] \fBdxf\*=\fIname\fR [\fBlines\*=\fIname\fR[,\fIname\fR,...]] \ [\fBlabels\*=\fIname\fR[,\fIname\fR,...]] [\fBprefix\*=\fIname\fR] .SH DESCRIPTION The \fIv.in.dxf\fR data conversion program generates GRASS \fIdig\fR, \fIdig_ascii\fR, and \fIdig_att\fR files from a file in DXF format. Each layer in the DXF input file is converted to a separate \fIdig\fR (or \fIdig_ascii\fR) layer. For each DXF layer containing text, a \fIdig_att\fR file is also created. These output files are placed in the \fIdig\fR, \fIdig_ascii\fR, and \fIdig_att\fR directories under the user's current GRASS mapset. .LP Output from this program is designed to be used as input to the program \fIv.cadlabel\fR. .LP The \fIv.in.dxf\fR program will only recognize points, lines, polylines, and text in the DXF format, and will translate these to GRASS vector format; other types of data are ignored. .LP \fBFlag:\fR .IP \fB-a\fR 15 Output an ASCII GRASS vector (\fIdig_ascii\fR) file rather than a binary GRASS vector (\fIdig\fR) file. .LP \fBParameters:\fR .IP \fBdxf\*=\fIname\fR 15 Name of the DXF input design file to be converted to GRASS vector format. .IP "\fBlines\*=\fIname\fR[\fI,name,...\fR] or \fBlines\*=\fIin_name:out_name\fR[\fI,in_name:out_name,...\fR]" 15 Name(s) of layer(s) in the DXF input file containing line data, and (optionally) the name(s) to be assigned to the GRASS vector data (\fIdig\fR or \fIdig_ascii\fR) files output. .br Default: Convert each layer containing data in the \Idxf\fR file to a GRASS vector data (\fIdig\fR or \fIdig_ascii\fR) file. .IP "\fBlabels\*=\fIname\fR[\fI,name,...\fR] or \fBlabels\*=\fIin_name:out_name\fR[\fI,in_name:out_name,...\fR]" 15 Name(s) of layer(s) in the DXF input file containing text labels, and (optionally) the name(s) to be assigned to the GRASS vector attribute (\fIdig_att\fR) files output. .br Default: Convert each layer containing text labels in the \fIdxf\fR map to a GRASS vector attribute (\fIdig_att\fR) file. .IP \fBprefix\*=\fIname\fR 15 Prefix assigned to the \fIdig\fR or \fIdig_ascii\fR and \fIdig_att\fR output file names. The names of the GRASS vector (\fIdig\fR, \fIdig_ascii\fR, and \fIdig_att\fR) files output are constructed as \fIprefix.extension\fR, where \fIprefix\fR is the \fIprefix\fR name specified by the user and \fIextension\fR is the number of the DXF layer from which the data were obtained. If the user does not specify a \fIprefix\fR name, the output files take their prefix from the prefix of the input DXF map layer. For example, for the DXF file named \fIstreams.dxf\fR containing line data on layer 15, the GRASS vector map layer output would be named \fIstreams.15\fR. .SH EXAMPLES .IP \fBlines\*=15\fR 20 Outputs line data in DXF layer 15. .IP \fBlines\*=15,16\fR 20 Outputs line data in DXF layers 15 and 16. .IP \fBlines\*=ROADS,WATER\fR 20 Converts line data in DXF layers ROADS and WATER. .IP \fBlines\*=15:16\fR 20 Outputs line data in DXF layer 15, and places it in the \fIdig\fR (or \fIdig_ascii\fR) file for DXF layer 16. .LP The below examples are given for a DXF design file named \fIcont.dxf\fR containing contour lines and contour line labels, in which: .LP .RS index contour lines are in DXF layer 9, .br intermediate contour lines are in DXF layer 11, and .br index labels and some intermediate contour lines are in DXF layer 12. .RE .LP .LP \fIv.in.dxf\fR can be run with default values, as shown below: .LP .RS \fBv.in.dxf dxf\*=cont.dxf \fR .RE .LP Here, this is equivalent to running the following command: .LP .RS \fBv.in.dxf dxf\*=cont.dxf lines\*=9,11,12 labels\*=12 \fR .RE .LP Either of the above commands will produce three GRASS \fIdig\fR files (named \fIcont.9, cont.11,\fR and \fIcont.12\fR) and one \fIdig_att\fR file (named \fIcont.12\fR). .LP In our example, however, the \fIcont.12\fR file contains intermediate contour lines that the user would like to add to the \fIdig\fR file \fIcont.11\fR. Our user also wishes to use a different file prefix than the default prefix \fIcont\fR. The user therefore types the following command: .LP .RS \fBv.in.dxf dxf\*=cont.dxf lines\*=9,11,12:11 labels\*=12 prefix\*=contour \fR .RE .LP The above command will generate three \fIdig\fR files (named \fIcontour.9, contour.11, contour.12\fR), and will create one \fIdig_att\fR file containing text labels (called \fIcontour.12\fR). No contour lines will appear in the \fIdig_att\fR file. .SH NOTES \fBOutput Filenames:\fR .br The output filename, \fIprefix.extension\fR, conforms with the GRASS limit of 14 characters. The entire prefix name is used, a '.' inserted, and as much of the extension name is used as the 14 character limit will permit. Excess characters are truncated. To minimize the possibility of creating output files with the same names (resulting in loss of data from the DXF file), use the prefix option to abbreviate the DXF file name. This will leave the majority of characters available for differentiating between layer names. \fBTranslation:\fR .br This data translation program does not contain any of the quality control functions available in \fIv.digit\fR that will prevent data in an improper format from being input to a GRASS data base. If present, DXF entities are placed in output file(s) corresponding to the layers on which they occurred in the DXF design file input. \fBEditing:\fR .br If the user asks \fIv.in.dxf\fR to output ASCII vector (\fIdig_ascii\fR) files, they must be converted to binary vector format before they are usable by most GRASS vector commands. The user can convert GRASS vector files from ASCII to binary format by running such programs as \fIv.support\fR or \fIv.in.ascii\fR. After conversion to binary format the vector files can be displayed (e.g., with \fId.vect\fR); however, the user must run \fIv.support\fR on the binary vector files before they can be edited in \fIv.digit\fR. The files output by \fIv.in.dxf\fR will preserve the data in whatever form they exist in the DXF file. This means that output files may contain unsnapped nodes, overshoots, gaps, and replicated lines. The data, and the file header information (including the owner's name, map's name, date, and scale, and UTM zone) for the GRASS vector files output may require editing by the user in \fIv.digit\fR. \fBAttributes:\fR .br The \fIv.in.dxf\fR program attaches attributes only to DXF text data that are converted to GRASS vector data (such as contour line labels). Attributes are not attached to converted DXF line data. For each layer of text data in the DXF design file, \fIv.in.dxf\fR generates a vector file consisting of rectangular boxes (lines) that are drawn around the DXF text data, and uses the text values to create a GRASS attribute file for the boxes. The vector and attribute files can then be used to label contour lines with the \fIv.cadlabel\fR program. .SH "SEE ALSO" .I v.cadlabel, .I v.digit, .I v.in.ascii, .I v.out.dxf, .I v.support .SH "AUTHORS" Original \fIdxf2dig\fR program written by Jan Moorman, U.S. Army Construction Engineering Research Laboratory (6/89) .LP Revised by Dave Gerdes, U.S. Army Construction Engineering Reseach Laboratory (12/89) .LP Revised and appended by Jan Moorman, U.S. Army Construction Engineering Research Laboratory (7/90) .LP Code for arcs and circles from National Park Service GIS Division written by Tom Howard.