Geoscience Reference
In-Depth Information
Lower Right (
672615.000, 5769885.000) ( 6d28'56.81"W, 52d 3'
9.52"N)
...
To interface with the OpenStreetMap download utility, we need to transform
these coordinates to lon/lat (EPSG:4326) in decimals. The conversion can be done
with the GDAL utility gdaltransform , by providing both the source ( -s_srs
EPSG:32628 and target ( -t _ srs EPSG:4326 ) coordinate systems:
gdaltransform -s_srs epsg:32629 -t_srs epsg:4326
438585 5997015
-9.9395884135393 54.1176086117612 0
672615 5769885
-6.48244800311155 52.0526455139185 0
To download the OSM vector file, we can either use the OSM Web interface
presented in Sect. 2.2 or from the command line. In this instance, we demonstrate
the use of the latter approach using the wget Linux command line utility. It is
necessary to pass the bounding box to the URL in the following order: min_x,
min_y, max_x, max_y :
wget http://overpass.osm.rambler.ru/
cgi/xapi_meta?*[bbox=-9.940,52.0526,-6.482,54.118]
The resulting vector file is 880MB large. Downloading it can take several minutes
to hours, depending on your Internet connection. After completion, we rename the
vector to vector.osm .
mv xapi_meta\?\*\[bbox\=-9.940\,52.0526\,-6.482\, 54.118\]
vector.osm
The OSM vector we downloaded contains multiple layers, which we can list with
the utility ogrinfo .
ogrinfo -so -al vector.osm
...
Layer name: points
Layer name: lines
Layer name: multilinestrings
Layer name: multipolygons
Layer name:other_relations
 
 
Search WWH ::




Custom Search