openstreetmappostgisoverpass-apipgroutingosm2pgsql

Why are there tag keys missing when downloading OSM data to Postgis / Postgresql?


I'm working on a routing application using OSM data in pgrouting. I'm using overpass-api to access the data from a specific bounding box. However, after downloading the data, there seem to be tag_keys missing from the data.

When inspecting the data using postgis or QGIS, certain tag_keys are there, like "highway", "oneway" or "maxpeed". However, others seem to be missing. In particular the tag keys "bicycle" (with possible values like "yes" or "no") or "access" are not included in the data. These tag keys are available on OSM online, however.

The following code is used to retrieve the data from OSM through Overpass-API and put it into PGrouting

CITY="Utrecht_west"
BBOX="4.9926,52.0698,5.0772,52.1172"
wget --progress=dot:mega -O "$CITY.osm" "http://www.overpass-api.de/api/xapi?*[bbox=${BBOX}][@meta]"

OSM2pgrouting converter
cd ~/Desktop/Utrecht
osm2pgrouting \
    -f Utrecht_west.osm \
    -d utrecht_west \
    -U user

I expect these lines to download all data in the bounding box, but some tag keys seem to be missing. What am I doing wrong here?

edit: it seems to be a similar issue to this post, however, I cannot find another answer to a similar issue


Solution

  • I'm not familiar with osm2pgrouting. However it looks like mapconfig.xml doesn't include "bicycle" and "access" tags. You either need to add them or create your own config file. If you want osm2pgrouting to consider these tags during routing this might not be enough, though.