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 Shapefile
CSV
GML
KML
Mapinfo File
PostgreSQL/PostGIS
TIGER

For further available drivers go here.

NOTES

To export areas with holes into, e.g., a Shapefile, while keeping the holes as holes, the flag -c has to be used.

EXAMPLES

Export to Shapefile

Export lines from GRASS vector map to Shapefile format (generates /tmp/testogr.shp and related files):
v.out.ogr input=multi type=line dsn=/tmp olayer=testogr 
Export areas from GRASS vector map to Shapefile format (generates /tmp/testogr.shp and related files):
v.out.ogr input=multi type=area dsn=/tmp olayer=testogr 
Export 3D lines from GRASS vector map to Shapefile format:
v.out.ogr input=lines_3d type=line dsn=/tmp olayer=testogr lco="SHPT=ARCZ"

Export to GML

Export lines from GRASS vector map to GML format (generates /tmp/testogr.gml file with layer 'testogr'):
v.out.ogr input=multi type=line dsn=/tmp/testogr.gml olayer=testogr format=GML 

Export to PostgreSQL/PostGIS

Export areas from GRASS vector map directly to PostGIS:
v.out.ogr input=polygons type=area \
          dsn="PG:host=localhost dbname=postgis user=postgres" \
          olayer=polymap format=PostgreSQL

Export to KML (Google Earth)

Export faces (3D vectors) from GRASS vector map in KML format for Google Earth:
v.out.ogr in=buildings_3d dsn=buildings_3d.kml olayer=buildings_3d format=KML type=face

REFERENCES

OGR vector library
OGR vector library C API documentation

SEE ALSO

v.external, v.in.ogr

AUTHORS

Radim Blazek, ITC-Irst, Trento, Italy
Some contributions: Markus Neteler, Martin Landa

Last changed: $Date$