.TH db.out.ogr 1grass "" "GRASS 8.3.1" "GRASS GIS User's Manual" .SH NAME \fI\fBdb.out.ogr\fR\fR \- Exports attribute tables into various formats. .SH KEYWORDS database, export, output, attribute table .SH SYNOPSIS \fBdb.out.ogr\fR .br \fBdb.out.ogr \-\-help\fR .br \fBdb.out.ogr\fR \fBinput\fR=\fIname\fR \fBoutput\fR=\fIname\fR [\fBlayer\fR=\fIstring\fR] \fBformat\fR=\fIstring\fR [\fBtable\fR=\fIname\fR] [\-\-\fBoverwrite\fR] [\-\-\fBhelp\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] [\-\-\fBui\fR] .SS Flags: .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 GRASS table name .br Or data source for direct OGR access .IP "\fBoutput\fR=\fIname\fR \fB[required]\fR" 4m .br Output table file name or DB connection string .IP "\fBlayer\fR=\fIstring\fR" 4m .br Layer number or name .br Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name. .br Default: \fI1\fR .IP "\fBformat\fR=\fIstring\fR \fB[required]\fR" 4m .br Table format .br Options: \fICSV, DBF, GML, MySQL, PostgreSQL, SQLite\fR .br Default: \fICSV\fR .IP "\fBtable\fR=\fIname\fR" 4m .br Name for output table (default: input name) .SH DESCRIPTION \fIdb.out.ogr\fR exports GRASS GIS attribute tables into various formats as supported by the OGR driver on the local system (CSV, DBF, PostgreSQL, SQLite, MySQL, ODBC, etc.). .PP The \fIoutput\fR parameter is used to define the output file name (if the path is not defined, the module will attempt to write to the current directory). In case of a database connection as output, the connection string has to be specified. .PP The \fIlayer\fR parameter is needed if the attribute table to be exported is linked as non\-default layer to a vector map. .SH EXAMPLES .SS Export of GRASS GIS attribute table to a CSV table file (default format) .br .nf \fC db.out.ogr input=precip_30ynormals output=precip_30ynormals.csv \fR .fi .SS Export of a GRASS GIS attribute table to a DBF table .br .nf \fC db.out.ogr input=precip_30ynormals output=precip_30ynormals.dbf format=DBF \fR .fi .SS Export of GRASS GIS attribute table into a PostgreSQL table .br .nf \fC db.out.ogr input=precip_30ynormals \(rs output=\(dqPG:host=localhost dbname=meteo user=neteler\(dq \(rs format=PostgreSQL # verify echo \(dqSELECT * FROM precip_30ynormals\(dq | psql meteo \fR .fi .SH SEE ALSO \fI db.tables \fR .PP \fI GRASS SQL interface \fR .SH AUTHORS Markus Neteler .br Converted to Python by Glynn Clements .SH SOURCE CODE .PP Available at: db.out.ogr source code (history) .PP Accessed: Sunday Dec 17 17:22:49 2023 .PP Main index | Database index | Topics index | Keywords index | Graphical index | Full index .PP © 2003\-2023 GRASS Development Team, GRASS GIS 8.3.1 Reference Manual