2

I already used osm2po for ways extraction, but still cannot understand how to get administrative boundaries with osm2po.

There is relationTagResolver in config section and v.5.1.0 description says, that here is a strong emphasis on Boundaries and Polygons.

Does somebody used osm2po for successfull getting different (admin_level 2, 3, 4, ...) boundaries?

1

Boundaries are a beast and definetily OSM's most vulnerable spot. A small change and nothing works anymore. But to answer your question: Yes and No. osm2po supports Boundaries and since 5.1.20 even a lightweight Geo(Reverse)-Coding. But it strongly depends on the country you are going to convert. Only a few are tagged sufficiently - so dont expect too much. In addition, osm2po only converts the main levels 2,4,(5),6,8,(10) and their meaning (except for 2) depends an the country. If you are not going to combine ways and boundaries - leaving the latter isolated in some way - I recommend to fallback to sth. like this here:

For osm2po please download the latest non official version (currently 5.1.26). Inside the demo package you'll find a demo.txt. Here is an excerpt:

case=off
cmd=tzjp
tileSize=x
disablePreFilter=true
rtr.support.boundaries=true
rtr.support.restrictions=false
postp.0.class=de.cm.osm2po.plugins.postp.PgPolyRelWriter

And there is another Postprocessor which is able to write the data directly into the graph file for routing.

But ... osm2po does not support cascaded Relations, so sth. like Boundaries referencing collections of other Boundaries will not be translated.

Tip: Do not start with the whole world, test small extracts first.

Hamburg Boundaries

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.