Geoscience Reference
In-Depth Information
as -sql, -where, -dialect are also available and demonstrated there. We
will return to ogrinfo during the case studies.
2.4 ogr2ogr
Although the ogr2ogr is only one command with a large set of command line
options, in its simplest form it can be used to reproject and subset spatial datasets.
Its versatility and flexibility extends to allow complex spatial and attribute filters
to be passed as command line arguments as well as to perform simple vector
based spatial analysis. The full list of command line arguments outlined below
can be produced using ogr2ogr --help . As a precursor to this section, the
general syntax for ogr2ogr is to specify the destination datasource name first
( dst_datasource_name ) followed by the input or source datasource name
( src_datasource_name ):
Usage: ogr2ogr [--help-general] [-skipfailures] [-append]
[-update]
[-select field_list] [-where restricted_where]
[-progress] [-sql <sql statement>] [-dialect
dialect]
[-preserve_fid] [-fid FID]
[-spat xmin ymin xmax ymax]
[-a_srs srs_def] [-t_srs srs_def] [-s_srs
srs_def]
[-f format_name] [-overwrite] [[-dsco NAME=VALUE]
...]
dst_datasource_name src_datasource_name
[-lco NAME=VALUE] [-nln name] [-nlt type] [-dim
2|3] [layer [layer ...]]
Advanced options :
[-gt n]
[-clipsrc [xmin ymin xmax
ymax]|WKT|datasource|spat_extent]
[-clipsrcsql sql_statement] [-clipsrclayer layer]
[-clipsrcwhere expression]
[-clipdst [xmin ymin xmax ymax]|WKT|datasource]
[-clipdstsql sql_statement] [-clipdstlayer layer]
[-clipdstwhere expression]
[-wrapdateline][-datelineoffset val]
[[-simplify tolerance] | [-segmentize max_dist]]
[-fieldTypeToString All|(type1[,type2]*)]
[-fieldmap identity | index1[,index2]*]
[-splitlistfields] [-maxsubfields val]
[-explodecollections] [-zfield field_name]
[-gcp pixel line easting northing [elevation]]*
[-order n | -tps]
Note: ogr2ogr --long-usage for full help.
The description of each command line option and argument (from the official
GDAL website) is:
 
 
Search WWH ::




Custom Search