other versions
- jessie 6.4.4-1
- stretch 7.2.0-2
- testing 7.6.0-1
- unstable 7.6.0-1
- experimental 7.6.1-1~exp1
| v.in.db(1grass) | Grass User's Manual | v.in.db(1grass) |
NAME¶
v.in.db - Creates new vector (points) map from database table containing coordinates.KEYWORDS¶
vector, import, database, pointsSYNOPSIS¶
v.in.dbFlags:¶
- --overwrite
-
Allow output files to overwrite existing files
- --verbose
-
Verbose module output
- --quiet
-
Quiet module output
Parameters:¶
- table=name
-
Input table name
- driver=name
-
Driver nameOptions: pg,dbf,ogr,odbc,mysql,sqliteDefault: dbf
- database=name
-
Database nameDefault: $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/
- x=name
-
Name of column containing x coordinate
- y=name
-
Name of column containing y coordinate
- z=name
-
Name of column containing z coordinate
- key=name
-
Name of column containing category numberMust refer to an integer column
- where=sql_query
-
WHERE conditions of SQL statement without 'where' keywordExample: income = 10000
- output=name
-
Name for output vector map
DESCRIPTION¶
v.in.db creates a new vector (points) map from database table containing coordinates.EXAMPLE¶
1) Creating a map from PostgreSQL table:¶
table=pat_stazioni x=east y=north z=quota key=id output=pat_stazioni
2) Creating a map from PostGIS:¶
To extract coordinate values from PostGIS, functions have to be used:table=station x="x(geom)" y="y(geom)" z="z(geom)" key=id out=meteostations
3) Import of a points table (x, y, z) from DBF file to vector points map:¶
key=idcol out=dtmpoints
4) Import of a points table (x, y, z) from SQLite file to vector points map:¶
key=idcol out=dtmpoints
5) Import of a points table (x, y, z) from DBF file to vector points map for selected points only:¶
The user can import only selected vector points from a table using the where parameter (see above for general DBF handling):key=idcol out=dtmpoints where="x NOT NULL and z > 100"
SEE ALSO¶
db.execute, db.in.ogr, v.info, v.in.ogr, v.to.db SQL support in GRASS GISAUTHOR¶
Radim Blazek Last changed: $Date: 2014-05-11 23:13:16 +0200 (Sun, 11 May 2014) $ Full index © 2003-2014 GRASS Development Team| GRASS 6.4.4 |