If the layer parameter is not given, all available layers are imported.
The optional spatial parameter defines spatial query extents. This parameter allows to restrict the region to a spatial subset while importing the data. All vector completely or partially falling into this rectangle subregion are imported.
Topology cleaning on areas is automatically performed, but may fail in special cases (then use v.clean).
Further available drivers such as UK .NTF, SDTS, TIGER, IHO S-57 (ENC), DGN, GML, AVCBin, REC, Memory, OGDI, and PostgreSQL depend on the local installation (OGR library), for details see OGR web site.
If the user wishes to ignore the difference between the apparent coordinate system of the source data and the current location, they may pass the -o flag to override the projection check.
If the user wishes to import the data with the full projection definition, it is possible to have v.in.ogr automatically create a new location based on the projection and extents of the file being read. This is accomplished by passing the name to be used for the new location via the location parameter. Upon completion of the command, a new location will have been created (with only a PERMANENT mapset), and the vector map will have been imported with the indicated output name into the PERMANENT mapset.
v.in.ogr dsn=/home/user/shape_data layer=test_shape output=grass_map
v.in.ogr dsn=./ layer=mapinfo_test output=grass_map
v.in.ogr dsn=gemeinden layer=LAB,ARC type=centroid,boundary output=mymap
avcimport e00file coverage v.in.ogr dsn=coverage layer=LAB,ARC type=centroid,boundary output=mymap
v.in.ogr dsn=CITXCATD.DDF output=cities
v.in.ogr dsn=input/2000/56015/ layer=CompleteChain,PIP output=t56015_all \ type=boundary,centroid snap=-1
v.in.ogr dsn="PG:host=localhost dbname=postgis user=postgres" layer=polymap \ output=polygons type=boundary,centroid
v.in.ogr dsn=OCI:username/password@database_instance output=grasslayer layer=roads_oci
For schema support, first db.connect has to be used to set a default schema. In db.* modules the schema name must be always specified if used. Example:
db.connect driver=pg database=test schema=user1 group=group1 db.login driver=pg database=test user=user1 password=pwd1 v.in.ogr dsn=./ layer=river output=river # -> table user1.river db.select table=user1.river
db.connect driver=pg database=test db.login driver=pg database=test user=user1 password=pwd1 v.in.ogr dsn=./ layer=river output=river # -> table public.river db.select table=river
[A-Za-z][A-Za-z0-9_]*
If a message like "WARNING: Area size 1.3e-06, area not imported." appears, the min_area may be adjusted to a smaller value in case that all areas shall be imported. Otherwise tiny areas are filtered out during import (useful to polish digitization errors or non-topological data).
Last changed: $Date$