I am interested in obtaining the foot paths from OSM data. Specifically I consider the area within the city limits of Berlin. I downloaded the corresponding OSM file from Geofabrik and I intend to use osmosis
to filter the data. As a first step I would like the ways which are usable by pedestrians. I have started out with this:
osmosis --read-xml file=berlin-latest.osm.bz2 --tag-filter accept-ways highway=footway --used-node --write-xml file="berlin-foot.osm"
However, I am not sure about when the tags footway and pedestrian. Essentially I want to end up with a graph so I can perform routing tasks. Will I need both relations in this case? Also, at least the pedestrian highways seem to sometimes contain "area=yes" tags. Can I filter on the way type as well?
Edit: I would like all the ways which can be used by pedestrians, I don't want to restrict myself to pedestrian-only ways. My current version is this:
INPUT="berlin-latest"
osmosis --read-xml file="${INPUT}.osm.bz2" \
--tag-filter accept-ways highway=footway,pedestrian,path,track \
--tag-filter reject-relations --used-node --write-xml file="${INPUT}-foot.osm.bz2"
osmosis --read-xml file="${INPUT}.osm.bz2" \
--tag-filter accept-ways highway=* \
--tag-filter accept-ways sidewalk=both,left,right,yes \
--tag-filter reject-relations --used-node --write-xml file="${INPUT}-sidewalk.osm.bz2"
osmosis --read-xml file="${INPUT}.osm.bz2" \
--tag-filter accept-ways highway=residential,unclassified,living_street \
--tag-filter reject-relations --used-node --write-xml file="${INPUT}-residential.osm.bz2"
osmosis --read-xml file="${INPUT}-sidewalk.osm.bz2" \
--read-xml file="${INPUT}-foot.osm.bz2" \
--read-xml file="${INPUT}-residential.osm.bz2" \
--merge --merge --write-xml file="${INPUT}-pedestrian.osm.bz2"
This seems reasonable, although I am still uncertain regarding area tags. Also I might remove the access=private
ways. Another problem is that some highways are missing their sidewalk
tags, so some more mapping would have to be done...