Geoscience Reference
In-Depth Information
-so
Print summary only.
-al
Print info for all layers.
For the purposes of our training data, we will concentrate on the multipolygons
only. Unlike lines, for instance, they represent areal units that can cover raster cell
values. To match the projection of our Landsat raster dataset, we reproject the OSM
vector to UTM 84/UTM zone 29N (EPSG:32629) using the utility ogr2ogr .We
also convert the vector to the Spatialite format, all with a single ogr2ogr command
(mind order of input and output).
ogr2ogr -f SQLite -t_srs epsg:32629 vector_32629.sqlite
vector.osm multipolygons
-f SQLite
Output vector type is SQLite.
-t_srs epsg:32629
Target coordinate reference system of output vector (input projection is read
from input file).
vector_32629.sqlite
Name of the output vector dataset.
vector.osm
Name of the input vector dataset.
multipolygons
Select layer name “multipolygons” from input vector dataset only.
17.2.2 Add Label Attributes
There are different approaches on how woodland can be tagged in OpenStreetMap. 5
The difference between them enters the discussion of how land is actually used (e.g.
managed or unmanaged forest). For mapping tree cover, we are merely interested in
land cover and the key “natural” equal to “wood” is most suitable for our purpose.
To have an idea on the number of multipolygons tagged as wood, we can count
t h em using a SQL command within the ogrinfo utility:
ogrinfo -sql "SELECT natural, COUNT(*) FROM multipolygons WHERE
natural='wood'" vector_32629.sqlite
5 http://wiki.openstreetmap.org/wiki/Tag:natural%3Dwood
 
 
Search WWH ::




Custom Search