.TH v.out.ascii 1grass "" "GRASS 8.3.1" "GRASS GIS User's Manual" .SH NAME \fI\fBv.out.ascii\fR\fR \- Exports a vector map to a GRASS ASCII vector representation. .br By default only features with category are exported. To export all features use \(cqlayer=\-1\(cq. .SH KEYWORDS vector, export, output, ASCII .SH SYNOPSIS \fBv.out.ascii\fR .br \fBv.out.ascii \-\-help\fR .br \fBv.out.ascii\fR [\-\fBocr\fR] \fBinput\fR=\fIname\fR [\fBlayer\fR=\fIstring\fR] [\fBtype\fR=\fIstring\fR[,\fIstring\fR,...]] [\fBoutput\fR=\fIname\fR] [\fBcolumns\fR=\fIname\fR[,\fIname\fR,...]] [\fBcats\fR=\fIrange\fR] [\fBwhere\fR=\fIsql_query\fR] \fBformat\fR=\fIstring\fR [\fBseparator\fR=\fIcharacter\fR] [\fBprecision\fR=\fIinteger\fR] [\-\-\fBoverwrite\fR] [\-\-\fBhelp\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] [\-\-\fBui\fR] .SS Flags: .IP "\fB\-o\fR" 4m .br Create old (version 4) ASCII file .IP "\fB\-c\fR" 4m .br Include column names in output (points mode) .IP "\fB\-r\fR" 4m .br Only export points falling within current 3D region (points mode) .IP "\fB\-\-overwrite\fR" 4m .br Allow output files to overwrite existing files .IP "\fB\-\-help\fR" 4m .br Print usage summary .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .IP "\fB\-\-ui\fR" 4m .br Force launching GUI dialog .SS Parameters: .IP "\fBinput\fR=\fIname\fR \fB[required]\fR" 4m .br Name of input vector map .br Or data source for direct OGR access .IP "\fBlayer\fR=\fIstring\fR" 4m .br Layer number or name (\(cq\-1\(cq for all layers) .br A single vector map can be connected to multiple database tables. This number determines which table to use. When used with direct OGR access this is the layer name. .br Default: \fI1\fR .IP "\fBtype\fR=\fIstring[,\fIstring\fR,...]\fR" 4m .br Input feature type .br Options: \fIpoint, line, boundary, centroid, area, face, kernel\fR .br Default: \fIpoint,line,boundary,centroid,area,face,kernel\fR .IP "\fBoutput\fR=\fIname\fR" 4m .br Name for output ASCII file or ASCII vector name if \(cq\-o\(cq is defined .br If not given or \(cq\-\(cq then standard output .IP "\fBcolumns\fR=\fIname[,\fIname\fR,...]\fR" 4m .br Name of attribute column(s) to be exported (point mode) .br \(dq*\(dq for all columns .IP "\fBcats\fR=\fIrange\fR" 4m .br Category values .br Example: 1,3,7\-9,13 .IP "\fBwhere\fR=\fIsql_query\fR" 4m .br WHERE conditions of SQL statement without \(cqwhere\(cq keyword .br Example: income < 1000 and population >= 10000 .IP "\fBformat\fR=\fIstring\fR \fB[required]\fR" 4m .br Output format .br Options: \fIpoint, standard, wkt\fR .br Default: \fIpoint\fR .br \fBpoint\fR: Simple point format (point per row) .br \fBstandard\fR: GRASS ASCII vector format .br \fBwkt\fR: OGC well\-known text .IP "\fBseparator\fR=\fIcharacter\fR" 4m .br Field separator .br Field separator (points mode) .br Default: \fIpipe\fR .IP "\fBprecision\fR=\fIinteger\fR" 4m .br Number of significant digits (floating point only) .br Options: \fI0\-32\fR .br Default: \fI8\fR .SH DESCRIPTION \fIv.out.ascii\fR converts a GRASS vector map in binary format to a GRASS vector map in ASCII format. Using flag \fB\-o\fR \fIv.out.ascii\fR output will be in old (version 4) ASCII format. .PP If the \fBoutput\fR parameter is not given then the data is sent to standard output. .SH NOTES The \fIv.in.ascii\fR module performs the function of \fIv.out.ascii\fR in reverse; i.e. it converts vector maps in ASCII format to their binary format. These two companion modules are useful both for importing and exporting vector maps between GRASS and other software, and for transferring data between machines. .PP If old version is requested, the \fBoutput\fR files from \fIv.out.ascii\fR is placed in the $LOCATION/$MAPSET/dig_ascii/ and $LOCATION/$MAPSET/dig_att directory. .PP If \fBlayer > 0\fR then only features with a category number will be exported. Use \fIv.category\fR to add them if needed or define \fBlayer=\-1\fR to export also features without category. .PP \fIv.out.ascii\fR in the old version mode (\fB\-o\fR) does not copy the dig_cats file associated with the binary vector \fBinput\fR map to the new \fBoutput\fR file name. The user must copy the dig_cats file to the new \fBoutput\fR name if this is desired (e.g. using the UNIX \fIcp\fR command). .PP It is possible to output the coordinates of vertices in a non\-points vector feature by first converting the vector feature to a points map with \fIv.to.points\fR and then exporting with \fIv.out.ascii\fR in \fBpoints\fR mode. .SH EXAMPLES .SS Standard mode See ASCII format specification. .PP .br .nf \fC v.out.ascii input=quads format=standard ORGANIZATION: US Army Const. Eng. Rsch. Lab DIGIT DATE: May 1987 DIGIT NAME: grass MAP NAME: Quads MAP DATE: May 1987 MAP SCALE: 24000 OTHER INFO: ZONE: 13 MAP THRESH: 18.288000 VERTI: B 4 599587.1820962 4914067.53414294 589639.15126831 4913922.5687301 589440.96838162 4927803.62500018 599375.87959179 4927959.83330436 B 2 599375.87959179 4927959.83330436 599587.1820962 4914067.53414294 B 4 599587.1820962 4914067.53414294 609541.5508239 4914236.0597482 609316.10665227 4928116.8490555 599375.87959179 4927959.83330436 C 1 1 594125.63 4921115.58 1 1 C 1 1 604433.84 4921087.1 1 2 \fR .fi .SS Point mode .br .nf \fC v.out.ascii input=quads format=point 594125.63|4921115.58|1 604433.84|4921087.1|2 \fR .fi Print also selected attributes: .br .nf \fC v.out.ascii input=geodetic_pts format=point where=\(dqcat > 5 and cat <= 8\(dq columns=GEOD_NAME 573638.06289275|271623.25042595|6|27 WC 6 574416.81289275|274116.65542595|7|27 WC 7 575301.31189275|275303.81342595|8|27 WC 8 \fR .fi To print all attributes type \fBcolumns=*\fR: .br .nf \fC v.out.ascii input=geodetic_pts format=point where=\(dqcat > 5 and cat <= 8\(dq columns=* 573638.06289275|271623.25042595|6|6|0.00000000|0.00000000|6|6|27 WC 6|573638.09200000|271623.24100000|0.00|0|1.00000000|1.00000000 574416.81289275|274116.65542595|7|7|0.00000000|0.00000000|7|7|27 WC 7|574416.84100000|274116.64900000|0.00|0|1.00000000|1.00000000 575301.31189275|275303.81342595|8|8|0.00000000|0.00000000|8|8|27 WC 8|575301.30600000|275303.82600000|0.00|0|1.00000000|1.00000000 \fR .fi .SS WKT mode WKT is abbreviation for Well\-known text. .br .nf \fC v.out.ascii input=quads format=wkt POLYGON((599587.18209620 4914067.53414294, 589639.15126831 4913922.56873010, 589440.96838162 4927803.62500018, 599375.87959179 4927959.83330436, 599587.18209620 4914067.53414294)) POLYGON((599587.18209620 4914067.53414294, 599375.87959179 4927959.83330436, 609316.10665227 4928116.84905550, 609541.55082390 4914236.05974820, 599587.18209620 4914067.53414294)) \fR .fi .SH SEE ALSO \fI v.category, v.in.ascii, v.to.points \fR .PP GRASS ASCII vector format specification .br GRASS SQL interface .SH AUTHORS Michael Higgins, U.S. Army Construction Engineering Research Laboratory .br James Westervelt, U.S. Army Construction Engineering Research Laboratory .br Radim Blazek, ITC\-Irst, Trento, Italy .br Attribute selection added by Martin Landa, Czech Technical University in Prague, Czech Republic (2008/12) .SH SOURCE CODE .PP Available at: v.out.ascii source code (history) .PP Accessed: Sunday Dec 17 17:22:26 2023 .PP Main index | Vector index | Topics index | Keywords index | Graphical index | Full index .PP © 2003\-2023 GRASS Development Team, GRASS GIS 8.3.1 Reference Manual