db.out.ogr(1)
π db.out.ogr π
okay bestie, welcome to the GRASS GIS User's Manual page for db.out.ogr β she's a lil icon in the GRASS GIS fam and she's about to make your attribute tables travel. π§³β¨
β¨ NAME β¨
db.out.ogr β exports attribute tables into various formats. no cap, that's literally her whole thing. π
π KEYWORDS π
database, export, output, attribute table π
π SYNOPSIS π
db.out.ogr
db.out.ogr --help
db.out.ogr input=name output=name [layer=string] format=string
[table=name] [--overwrite] [--help] [--verbose] [--quiet] [--ui]
π© Flags:
--overwriteβ lets your output files just bulldoze over existing files. allow it. π--helpβ prints the usage summary, i.e. the "what do I even do here" button π«Ά--verboseβ verbose module output, she talks more, she's chatty β¨--quietβ quiet module output, she whispers, she's mysterious π€«--uiβ forces the GUI dialog to launch. pop-up era. πͺ
ποΈ Parameters:
input=name[required] β GRASS table name. or, plot twist, a data source for direct OGR access. π¦output=name[required] β output table file name, or a DB connection string. πlayer=stringβ layer number or name. vector features can have category values in different layers, and this number picks which layer to use. when you're doing direct OGR access, this is the layer name instead. Default:1πformat=string[required] β table format. Options:CSV,DBF,GML,MySQL,PostgreSQL,SQLite. Default:CSVπtable=nameβ name for output table (default: input name). it's giving "same name, new zip code". π
πΈ DESCRIPTION πΈ
db.out.ogr exports GRASS GIS attribute tables into a whole menu of formats, whatever the OGR driver on your local system supports β CSV, DBF, PostgreSQL, SQLite, MySQL, ODBC, etc. so many options, so many vibes. ππ
the output parameter is what defines the output file name. if the path isn't defined, the module will attempt to write to the current directory β so yeah, she'll just drop it right there, lowkey bold of her. and if you're outputting to a database connection, you have to specify the connection string. no string, no table, periodt. π₯
the layer parameter is needed if the attribute table you're exporting is linked as a non-default layer to a vector map. so if your table's in its non-default era, say it with layer. π
π EXAMPLES π
Export of GRASS GIS attribute table to a CSV table file (default format)
db.out.ogr input=precip_30ynormals output=precip_30ynormals.csv
Export of a GRASS GIS attribute table to a DBF table
db.out.ogr input=precip_30ynormals output=precip_30ynormals.dbf format=DBF
Export of a GRASS GIS attribute table into a PostgreSQL table
db.out.ogr input=precip_30ynormals \
output="PG:host=localhost dbname=meteo user=neteler" \
format=PostgreSQL
# verify
echo "SELECT * FROM precip_30ynormals" | psql meteo
look at that verify step, she's thorough, she checks her work. main character energy fr fr. π
π SEE ALSO π
db.tables- GRASS SQL interface
π«Ά AUTHORS π«Ά
- Markus Neteler
- Converted to Python by Glynn Clements
legends, honestly. we stan. π
π» SOURCE CODE π»
Available at: db.out.ogr source code (history)
Accessed: Saturday Jan 17 05:41:51 2026
Main index | Database index | Topics index | Keywords index | Graphical index | Full index
and that's the whole page, bestie!! ππ go export something gorgeous. mwah. π
okay so final sign-off: this was the GRASS GIS 8.4.2 Reference Manual, Β© 2003-2025 GRASS Development Team β and this very page was db.out.ogr(1), printed by GRASS 8.4.2. slay, bye!! β¨π¦π
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms