I downloaded a PBF format of a region of OSM map. Is it possible to extract the value of KEY:HIGHWAY from this file using osmosis. The situation is I will give a location in lat/log (output of GPS) and I need to get the value of key HIGHWAY
from the file. Is it possilbe? If anyone have the codes please provide it.
Add a comment
|
1 Answer
The OSM wiki has osmosis example usages. This paragraph also mentions how to extract all highways:
osmosis --read-xml city.osm --tf accept-ways highway=* --used-node --write-xml highways.osm
Don't use this approach for an interactive router. Extracting these information on the fly will be slow and inefficient. Instead do this step once (including all information relevant for routing, not just highway tags) and calculate a routing graph on top of these ways. Or better just use one of the existing end user routing softwares for OSM.