Geoscience Reference
In-Depth Information
The most common vector data format is the ESRI Shapefile, which is a binary
format that was developed by ESRI and has been available since the early 1990s. It
has become one of the most widely used vector formats within the geospatial domain
and is consequently read by a plethora of GIS packages. Despite its widespread use,
it is now considered to have some limitations with respect to other types of vector
spatial data formats. For instance, field name lengths are limited to eight characters
and lack of topology is another limitation. Furthermore, the Shapefile consists of
several files, a minimum of three (.shp, .shx and .dbf), but commonly five or six;
each with the same filename but differing file extensions.
ogrinfo can also be used to retrieve basic information about vector spatial data
sets. The following examples are described using a subset of the OpenStreetMap data.
Unlike the ESRI Shapefile (Shp), the PBF contains many layers that are contained
within one file, which is very useful in terms of portability. It is possible to quickly
check the geometries of the individual layers stored in the OSM file by passing the
-q to ogrinfo :
ogrinfo -q ile-de-france-latest.osm.pbf
1: points (Point)
2: lines (Line String)
3: multilinestrings (Multi Line String)
4: multipolygons (Multi Polygon)
5: other_relations (Geometry Collection)
Using the OSM PBF data, we can retrieve basic metadata information using
ogrinfo . To print the basic information about the OSM PBF's dataset coordinate
reference system, fields etc., you simply pass the command line option -so to ogrinfo
followed by the name of the file as follows. The -al specifies that information about
all layers should be printed, while -so prints a summary of the information. (Note
only the output for the point here, but the full output will be printed in your shell).
ogrinfo -al -so ile-de-france-latest.osm.pbf
Had to open data source read -only.
INFO: Open of 'ile-de-france-latest.osm.pbf'
using driver 'OSM' successful.
Layer name: points
Geometry: Point
Feature Count: -1
Extent: (1.446244, 48.121800) - (3.558616, 49.240500)
Layer SRS WKT:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
 
 
Search WWH ::




Custom Search