table of contents
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.out.ogr(1grass) | Grass User's Manual | v.out.ogr(1grass) |
NAME¶
v.out.ogr - Converts GRASS vector map to one of the supported OGR vector formats.KEYWORDS¶
vector, exportSYNOPSIS¶
v.out.ogrFlags:¶
- -u
-
Open an existing datasource for update
- -s
-
Skip export of GRASS category ID ('cat') attribute
- -c
-
Export features with category (labeled) only. Otherwise all features are exported
- -e
-
Use ESRI-style .prj file format (applies to Shapefile output only)
- -z
-
Create 3D output if input is 3D (applies to Shapefile output only)
- -p
-
Export lines as polygons
- --verbose
-
Verbose module output
- --quiet
-
Quiet module output
Parameters:¶
- input=name
-
Name of input vector map
- type=string[,string,...]
-
Feature type(s). Combinations not supported by all output formats. Default: first type found in input.Options: point,line,boundary,centroid,area,face,kernel,autoDefault: line,boundary
- dsn=string
-
OGR output datasource nameFor example: ESRI Shapefile: filename or directory for storage
- olayer=string
-
OGR layer name. If not specified, input name is used.For example: ESRI Shapefile: shapefile name
- layer=integer
-
Layer numberA single vector map can be connected to multiple database tables. This number determines which table to use.Default: 1
- format=string
-
OGR formatOptions: ESRI_Shapefile,MapInfo_File,TIGER,S57,DGN,Memory,BNA,CSV,GML,GPX,LIBKML,KML,GeoJSON,Interlis_1,Interlis_2,GMT,SQLite,ODBC,MSSQLSpatial,PostgreSQL,MySQL,PCIDSK,DXF,Geoconcept,GeoRSS,GPSTrackMaker,PGDump,GPSBabel,GFT,CouchDB,ODS,XLSX,ElasticSearch,PDFDefault: ESRI_Shapefile
- dsco=string[,string,...]
-
OGR dataset creation option (format specific, NAME=VALUE)Default:
- lco=string[,string,...]
-
OGR layer creation option (format specific, NAME=VALUE)Default:
DESCRIPTION¶
v.out.ogr converts GRASS vector data to OGR format. OGR (Simple Features Library) is part of the GDAL library, so you need to install gdal to use v.out.ogr.Supported OGR Vector Formats¶
ESRI ShapefileNOTES¶
To export areas with holes into, e.g., a Shapefile, while keeping the holes as holes, the flag -c has to be used. The "-z" flag can be used to automatically export a 3D map to a 3D Shapefile, instead of setting the correct lco= option manually.EXAMPLES¶
Export to Shapefile¶
Export lines from GRASS vector map to Shapefile format:Export to GML¶
Export lines from GRASS vector map to GML format (generates /tmp/testogr.gml file with layer 'testogr'):Export to PostgreSQL/PostGIS¶
Export areas from GRASS vector map directly to PostGIS:dsn="PG:host=localhost dbname=postgis user=postgres" \
olayer=polymap format=PostgreSQL
Export to KML (Google Earth)¶
Example 1 (Latitude-Longitude location):format=KML type=face
type=face dsco="AltitudeMode=absolute"
REFERENCES¶
OGR vector librarySEE ALSO¶
db.out.ogr, v.external, v.in.ogrAUTHORS¶
Radim Blazek, ITC-Irst, Trento, Italy| GRASS 6.4.4 |