![]() |
![]()
| ![]() |
![]()
NAMEdb.in.ogr - Imports attribute tables in various formats. KEYWORDSdatabase, import, attribute table SYNOPSISdb.in.ogr
Flags:
Parameters:
DESCRIPTIONdb.in.ogr imports attribute tables in various formats as supported by the OGR library on the local system (DBF, CSV, PostgreSQL, SQLite, MySQL, ODBC, etc.). Optionally a unique key (ID) column can be added to the table. EXAMPLESImport CSV fileLimited type recognition can be done for Integer, Real, String,
Date, Time and DateTime columns through a descriptive file with same name as
the CSV file, but .csvt extension (see details here).
# NOTE: create koeppen_gridcode.csvt first for automated type recognition db.in.ogr input=koeppen_gridcode.csv output=koeppen_gridcode gdal_doo="AUTODETECT_TYPE=YES" db.describe koeppen_gridcode -c db.select table=koeppen_gridcode Import DBF tableImport of a DBF table with additional unique key column (e.g.,
needed for v.in.db).
db.in.ogr input=/path/to/mydata.dbf output=census_raleigh key=myid db.describe -c census_raleigh Import of a SQLite tabledb.in.ogr input=/path/to/sqlite.db db_table=census_raleigh output=census_raleigh Import of a PostgreSQL table# HINT: if the database contains spatial tables, but you want to import a non-spatial table, set the environmental variable PG_LIST_ALL_TABLES to YES before importing db.in.ogr input="PG:host=localhost dbname=ecad user=neteler" \ Import XLS fileTo force reading headers, define environmental variable
OGR_XLS_HEADERS=’FORCE’. Parameter db_table refers to
the list within XLS file.
export OGR_XLS_HEADERS=’FORCE’ db.in.ogr input=address.xls db_table=address_data SEE ALSOdb.select, v.in.ogr, v.in.db GRASS SQL interface AUTHORMarkus Neteler SOURCE CODEAvailable at: db.in.ogr source code (history) Latest change: Friday Dec 27 01:53:45 2024 in commit: bd53b2448f13719ddb4f5b4d5cf373f8c259de0b Main index | Database index | Topics index | Keywords index | Graphical index | Full index © 2003-2025 GRASS Development Team, GRASS GIS 8.4.1 Reference Manual
|