1ogr2ogr(1)                  General Commands Manual                 ogr2ogr(1)
2
3
4

NAME

6       ogr2ogr - ogr2ogr converts simple features data between file formats
7

SYNOPSIS

9       Usage: ogr2ogr [-skipfailures] [-append] [-update] [-f format_name]
10                      [-select field_list] [-where restricted_where]
11                      [-sql <sql statement>] [--help-general]
12                      [-spat xmin ymin xmax ymax] [-preserve_fid] [-fid FID]
13                      [-a_srs srs_def] [-t_srs srs_def] [-s_srs srs_def]
14                      [[-dsco NAME=VALUE] ...] dst_datasource_name
15                      src_datasource_name
16                      [-lco NAME=VALUE] [-nln name] [-nlt type] [layer [layer ...]]
17
18

DESCRIPTION

20       This program can be used to convert simple features data between file
21       formats performing various operations during the process such as
22       spatial or attribute selections, reducing the set of attributes,
23       setting the output coordinate system or even reprojecting the features
24       during translation.
25
26        -f format_name:
27           output file format name, some possible values are:
28
29            -f "ESRI Shapefile"
30            -f "TIGER"
31            -f "MapInfo File"
32            -f "GML"
33            -f "PostgreSQL"
34
35
36       -append:
37           Append to existing layer instead of creating new
38
39       -overwrite:
40           Delete the output layer and recreate it empty
41
42       -update:
43           Open existing output datasource in update mode rather than trying
44           to create a new one
45
46       -select field_list:
47           Comma-delimited list of fields from input layer to copy to the new
48           layer (defaults to all)
49
50       -sql sql_statement:
51           SQL statement to execute. The resulting table/layer will be saved
52           to the output.
53
54       -where restricted_where:
55           Attribute query (like SQL WHERE)
56
57       -spat xmin ymin xmax ymax:
58           spatial query extents
59
60       -dsco NAME=VALUE:
61           Dataset creation option (format specific)
62
63       -lco NAME=VALUE:
64           Layer creation option (format specific)
65
66       -nln name:
67           Assign an alternate name to the new layer
68
69       -nlt type:
70           Define the geometry type for the created layer. One of NONE,
71           GEOMETRY, POINT, LINESTRING, POLYGON, GEOMETRYCOLLECTION,
72           MULTIPOINT, MULTILINE, MULTIPOLYGON or MULTILINESTRING. Add '25D'
73           to the name to get 2.5D versions.
74
75       -a_srs srs_def:
76           Assign an output SRS
77
78       -t_srs srs_def:
79           Reproject/transform to this SRS on output
80
81       -s_srs srs_def:
82           Override source SRS
83
84       -fid fid:
85           If provided, only the feature with this feature id will be
86           reported. Operates exclusive of the spatial or attribute queries.
87
88       Srs_def can be a full WKT definition (hard to escape properly), or a
89       well known definition (ie. EPSG:4326) or a file with a WKT definition.
90
91       Example appending to an existing layer (both flags need to be used):
92
93       % ogr2ogr -update -append -f PostgreSQL PG:dbname=warmerda abc.tab
94
95       More examples are given in the individual format pages.
96

AUTHORS

98       Frank Warmerdam <warmerdam@pobox.com>, Silke Reimer
99       <silke@intevation.de>
100
101
102
103GDAL                              31 Jul 2007                       ogr2ogr(1)
Impressum