GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
db.in.ogr(1) GRASS GIS User's Manual db.in.ogr(1)

db.in.ogr - Imports attribute tables in various formats.

database, import, attribute table

db.in.ogr
db.in.ogr --help
db.in.ogr input=name [db_table=name] [output=name] [key=string] [encoding=string] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

--overwrite

Allow output files to overwrite existing files
--help

Print usage summary
--verbose

Verbose module output
--quiet

Quiet module output
--ui

Force launching GUI dialog

input=name [required]

Table file to be imported or DB connection string
db_table=name

Name of table from given DB to be imported
output=name

Name for output table
key=string

Name for auto-generated unique key column
encoding=string

Encoding value for attribute data

db.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.

Limited 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
db.select table=koeppen_gridcode

Import 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


db.in.ogr input=/path/to/sqlite.db db_table=census_raleigh output=census_raleigh


# 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" \
          db_table=ecad_verona_tmean output=ecad_verona_tmean
db.select table=ecad_verona_tmean
db.describe -c ecad_verona_tmean

To 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

db.select, v.in.ogr, v.in.db

GRASS SQL interface

Markus Neteler

Available at: db.in.ogr source code (history)

Main index | Database index | Topics index | Keywords index | Graphical index | Full index

© 2003-2021 GRASS Development Team, GRASS GIS 7.8.6 Reference Manual

GRASS 7.8.6

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.