1v.out.ogr(1)                  Grass User's Manual                 v.out.ogr(1)
2
3
4

NAME

6       v.out.ogr  - Converts to one of the supported OGR vector formats.
7

KEYWORDS

9       vector, export
10

SYNOPSIS

12       v.out.ogr
13       v.out.ogr help
14       v.out.ogr  [-cep]  input=name   [type=string[,string,...]]   dsn=string
15       [olayer=string]             [layer=integer]             [format=string]
16       [dsco=string[,string,...]]     [lco=string[,string,...]]    [--verbose]
17       [--quiet]
18
19   Flags:
20       -c
21           Export features with category (labeled) only.  Otherwise  all  fea‐
22           tures are exported
23
24       -e
25           Use ESRI-style .prj file format (applies to Shapefile output only)
26
27       -p
28           Export lines as polygons
29
30       --verbose
31           Verbose module output
32
33       --quiet
34           Quiet module output
35
36   Parameters:
37       input=name
38           Name of input vector map
39
40       type=string[,string,...]
41           Type
42           Feature type. Combination of types is not supported by all formats.
43           Options: point,kernel,centroid,line,boundary,area,face
44           Default: line,boundary
45
46       dsn=string
47           OGR output datasource name
48           For example: ESRI Shapefile: filename or directory for storage
49
50       olayer=string
51           OGR layer name. If not specified, input name is used.
52           For example: ESRI Shapefile: shapefile name
53
54       layer=integer
55           Layer number
56           A  single  vector map can be connected to multiple database tables.
57           This number determines which table to use.
58           Default: 1
59
60       format=string
61           OGR format
62           Options:             ESRI_Shapefile,MapInfo_File,TIGER,S57,DGN,Mem‐
63           ory,BNA,CSV,GML,GPX,KML,GeoJ‐
64           SON,Interlis_1,Interlis_2,GMT,SQLite,ODBC,PostgreSQL,MySQL,DXF,Geo‐
65           concept,GeoRSS,GPSTrackMaker,
66           Default: ESRI_Shapefile
67
68       dsco=string[,string,...]
69           OGR dataset creation option (format specific, NAME=VALUE)
70           Default:
71
72       lco=string[,string,...]
73           OGR layer creation option (format specific, NAME=VALUE)
74           Default:
75

DESCRIPTION

77       v.out.ogr  converts  GRASS vector data to OGR format.  OGR (Simple Fea‐
78       tures Library) is part of the GDAL library, so you need to install gdal
79       to use v.out.ogr.
80
81   Supported OGR Vector Formats
82       ESRI Shapefile
83       CSV
84       GML
85       KML
86       Mapinfo File
87       PostgreSQL/PostGIS
88       TIGER
89
90       For further available drivers go here.
91

NOTES

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

EXAMPLES

97   Export to Shapefile
98       Export lines from GRASS  vector  map  to  Shapefile  format  (generates
99       /tmp/testogr.shp and related files):
100       v.out.ogr input=multi type=line dsn=/tmp olayer=testogr
101         Export  areas  from  GRASS  vector map to Shapefile format (generates
102       /tmp/testogr.shp and related files):
103       v.out.ogr input=multi type=area dsn=/tmp olayer=testogr
104        Export 3D lines from GRASS vector map to Shapefile format:
105       v.out.ogr    input=lines_3d    type=line    dsn=/tmp     olayer=testogr
106       lco="SHPT=ARCZ"
107
108
109   Export to GML
110       Export   lines   from   GRASS  vector  map  to  GML  format  (generates
111       /tmp/testogr.gml file with layer 'testogr'):
112       v.out.ogr  input=multi  type=line  dsn=/tmp/testogr.gml  olayer=testogr
113       format=GML
114
115
116   Export to PostgreSQL/PostGIS
117       Export areas from GRASS vector map directly to PostGIS:
118       v.out.ogr input=polygons type=area \
119                 dsn="PG:host=localhost dbname=postgis user=postgres" \
120                 olayer=polymap format=PostgreSQL
121
122
123   Export to KML (Google Earth)
124       Export  faces  (3D  vectors)  from  GRASS  vector map in KML format for
125       Google Earth:
126       v.out.ogr in=buildings_3d dsn=buildings_3d.kml olayer=buildings_3d for‐
127       mat=KML type=face
128
129

REFERENCES

131       OGR vector library
132       OGR vector library C API documentation
133

SEE ALSO

135       v.external, v.in.ogr
136

AUTHORS

138       Radim Blazek, ITC-Irst, Trento, Italy
139       Some contributions: Markus Neteler, Martin Landa
140
141       Last changed: $Date: 2007-09-12 13:34:50 +0200 (Wed, 12 Sep 2007) $
142
143       Full index
144
145       © 2003-2008 GRASS Development Team
146
147
148
149GRASS 6.3.0                                                       v.out.ogr(1)
Impressum