Geoscience Reference
In-Depth Information
The result is a polygon Shapefile with each polygon feature defining the extent
of the input Shapefile. The ogrinfo command summarises the dataset containing
the 10 features.
ogrinfo -so -al tileindex.shp
INFO: Open of 'tileindex.shp'
using driver 'ESRI Shapefile' successful.
Layer name: tileindex
Geometry: Polygon
Feature Count: 10
Extent: (0.000000, 0.000000) - (3.942579, 49.286794)
Layer SRS WKT:
GEOGCS["GCS_WGS_1984",
DATUM["WGS_1984",
SPHEROID["WGS_84",6378137,298.257223563]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.017453292519943295]]
LOCATION: String (200.0)
2.6 OGR Virtual Format
The virtual format driver available in OGR is similar to the GDAL VRT described in
Chap. 11 , but applies specifically to vector datasets. You can check that your GDAL
installation supports this driver by checking that -> "VRT" (readonly) is listed
under ogrinfo --formats .
This driver is mainly used to transform features from other formats using a specifi-
cation in an XML file. In many cases, it is used to create spatial layers from geocoded
data stored in ASCII files. For instance, you may have a series of geocordinates repre-
senting field sampling plots that have associatedmeasurements or a set of coordinates
representing a GPS path. The virtual format provides the ability for different datasets
to be merged and to associate a CRS with each dataset.
In the following example we will demonstrate how the OGR VRT format can be
used to generate a virtual dataset from an ASCII or CSV file. Supposing we want to
create a virtual dataset using the following text file ( gps_paths.csv ) that contains
a set of lines using the Well Known Text (WKT) encoding. 5
5 WKT is text mark-up language for vector geometries that was originally defined by the OGC in
their specifications for Simple Feature Access and Coordinate Transformation Services. Both WKT
and the associated Well Known Binary (WKB) can be used to store the same objects in a relational
database management system, with the latter version being optimized for storage.
 
 
Search WWH ::




Custom Search