1v.out.ogr(1) Grass User's Manual v.out.ogr(1)
2
3
4
6 v.out.ogr - Convert to one of the supported OGR vector formats.
7
9 vector
10
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] [dsco=string]
16 [lco=string]
17
18 Flags:
19 -c Export features with category (labeled) only. Otherwise all fea‐
20 tures are exported
21
22 -e Use ESRI-style .prj file format (applies to SHAPE output only)
23
24 -p Export lines as polygons
25
26 Parameters:
27 input=name
28 Name of input vector map
29
30 type=string[,string,...]
31 Feature type. Combination of types is not supported by all formats.
32 Options: point,kernel,centroid,line,boundary,area,face Default:
33 line,boundary
34
35 dsn=string
36 OGR output datasource name. For example:
37 ESRI Shapefile: filename or directory for stor‐
38 age MapInfo File: filename or directory for storage
39
40 olayer=string
41 OGR layer name.
42 ESRI Shapefile: shapefile name MapInfo File:
43 mapinfo file name
44
45 layer=integer
46 Layer number Default: 1
47
48 format=string
49 OGR format. Options: ESRI_Shapefile,MapInfo_File,TIGER,S57,Mem‐
50 ory,CSV,GML,KML,SQLite,ODBC,PostgreSQL,MySQL, Default: ESRI_Shape‐
51 file
52
53 dsco=string
54 OGR dataset creation option (format specific, NAME=VALUE) Default:
55
56 lco=string
57 OGR layer creation option (format specific, NAME=VALUE) Default:
58
60 v.out.ogr converts GRASS vector data to OGR format. OGR (Simple Fea‐
61 tures Library) is part of the GDAL library, so you need to install gdal
62 to use v.out.ogr.
63 To export areas with holes into, e.g., a SHAPE file, while keeping the
64 holes as holes, the flag -c has to be used.
65
66 Supported OGR Vector Formats
67 ESRI Shapefile
68 CSV
69 GML
70 KML
71 Mapinfo File
72 PostgreSQL/PostGIS
73 TIGER
74
75 For further available drivers go here.
76
78 Export to SHAPE
79 Export lines from GRASS vector map to SHAPE format (generates
80 /tmp/testogr.shp and related files):
81
82 v.out.ogr input=multi type=line dsn=/tmp olayer=testogr
83 Export areas from GRASS vector map to SHAPE format (generates
84 /tmp/testogr.shp and related files):
85
86 v.out.ogr input=multi type=area dsn=/tmp olayer=testogr
87
88
89 Export to GML
90 Export lines from GRASS vector map to GML format (generates
91 /tmp/testogr.gml file with layer 'testogr'):
92
93 v.out.ogr input=multi type=line dsn=/tmp/testogr.gml olayer=testogr
94 format=GML
95
96
97 Export to PostgreSQL/PostGIS
98 Export areas from GRASS vector map directly to PostGIS:
99
100 v.out.ogr input=polygons type=area \
101 dsn="PG:host=localhost dbname=postgis user=postgres" \
102 olayer=polymap format=PostgreSQL
103
104
105 Export to KML (Google Earth)
106 Export faces (3D vectors) from GRASS vector map in KML format for
107 Google Earth:
108 v.out.ogr in=buildings_3d dsn=buildings_3d.kml olayer=buildings_3d for‐
109 mat=KML type=face
110
111
113 OGR vector library
114 OGR vector library C API documentation
115
117 v.external, v.in.ogr
118
120 Radim Blazek, ITC-Irst, Trento, Italy
121 Some contributions: Markus Neteler
122
123 Last changed: $Date: 2006/06/13 16:17:53 $
124
125 Full index
126
127
128
129GRASS 6.2.2 v.out.ogr(1)