Geoscience Reference
In-Depth Information
-zfield field_name
(starting with GDAL 1.8.0) Uses the specified field to fill the Z coordinate of
geometries
-gcp ungeoref_x ungeoref_y georef_x georef_y elevation
(starting with GDAL 1.10.0) Add the indicated ground control point. This option
may be provided multiple times to provide a set of GCPs.
-order n
(starting with GDAL 1.10.0) Order of polynomial used for warping (1 to 3). The
default is to select a polynomial order based on the number of GCPs.
-tps
(starting with GDAL 1.10.0) Force use of thin plate spline transformer based on
available GCPs.
-fieldmap
(starting with GDAL 1.10.0) Specifies the list of field indexes to be copied from
the source to the destination. The (n)th value specified in the list is the index of
the field in the target layer definition in which the n(th) field of the source layer
must be copied. Index count starts at zero. There must be exactly as many values
in the list as the count of the fields in the source layer. We can use the 'identity'
setting to specify that the fields should be transferred by using the same order.
This setting should be used along with the -append setting.
-addfields
(starting with GDAL 1.11) This is a specialized version of -append. Contrary to
-append, -addfields has the effect of adding, to existing target layers, the new
fields found in source layers. This option is usefull when merging files that have
non-strictly identical structures. This might not work for output formats that
don't support adding fields to existing non-empty layers.
A frequent operation that geospatial analysts are faced with is to convert spatial
data from one format into another. This can be done very easily using ogr2ogr .
The following example is the most basic application of ogr2ogr and demonstrates
how an OpenStreetMap PBF dataset can be converted into an ESRI Shapefile. As
specified above, the general syntax is to first specify the destination datasource name
followed by the source destination.
ogr2ogr
ile-de-france.shp ile-de-france-latest.osm.pbf
multipolygons
It is important to note that by converting the PBF dataset to an ESRI Shapefile,
it creates a directory named ile-de-france.shp , which contains individual
ESRI Shapefiles for each of the vector feature types listed below. This is done since
ESRI Shapefiles can only hold one feature type per file, whereas other formats like
Spatialite can hold many feature types within the one file:
landuse
natural
 
 
Search WWH ::




Custom Search