Wednesday, 14 March 2018

qgis - How to control what kind of tags / flags are imported with osm2po?


With the help of osm2po, I have successfully inserted the contents of the italian files (italy.osm.pbf) in a pgrouting-enabled database (postgresql 8.4)


It displays fine in Qgis, using rule based labeling (thanks to underdark for the .qml file).


Now I wonder: how can I find out what attributes are included in the .pbf and how to control what tags / flags are imported in the database? Any help very much appreciated.



Answer



Have a look into the osm2po.config file. There you'll find lines like this one:


wtr.tag.highway.motorway = 1, 11, 120

(concurrent order, clazz, default speed)


e.g. filter your clazz-column (clazz=11) and you'll retrieve all motorways.



concurrent order means, that if osm gives you two main tags for the same street (e.g. highway=residential and railway=rail) that one with the lower value (e.g. 1 vs. 2) will win.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...