2

I'm lost trying to render maps with administrative boundaries using OSM and Maperitive. For some cities, e.g. Mexico City, there are boundaries.

But, e.g. for Belo Horizonte, there are none, at least in the SVG I export for Illustrator (at zoom level 16) from Maperitive.

I find references in the OSM XML for Belo Horizonte to <tag k="boundary" v="administrative"/> and <tag k="admin_level" v="7"/>. Also, on the OSM website, the map of Belo Horizonte has an admin boundary:

http://www.openstreetmap.org/relation/368782#map=11/-19.9185/-43.9604

...although sometimes you may have to switch to MapQuest view and then back to Standard for it to appear.

So, it could be that no boundaries have been included in the OSM data for Belo Horizonte, or they have been and Maperitive isn't reading them. Advice very welcome...

=====update====

The answer here:

Finding administrative boundaries in Guinea using OSM

suggested using http://overpass-turbo.eu/ to get admin boundary data, but what I downloaded for BH (7MB) wasn't the boundary of BH.

===update 2===

Found this: http://global.mapit.mysociety.org/ but the search found no boundaries for BH. I guess there are none in oSM data.

0

2 Answers 2

2

You already linked to relation 368782 which is the relation you are looking for, isn't it? Therefore OSM obviously does include the boundary for Belo Horizonte and the problem must be at Maperitive.

Using the new wizard of overpass turbo and searching for name="Belo Horizonte" and boundary=administrative yields this result: http://overpass-turbo.eu/s/2pz which is the same boundary.

Check if the stylesheet you are using for Maperitive does include rendering rules for boundary=administrative with admin_level=8.

4
  • Thanks, I checked in maperitive's GoogleMaps.mrules and administrative boundaries were set to admin_level=2 OR admin_level=4. Changed that to 8 and BH now has boundaries. Feb 6, 2014 at 19:38
  • But... there is still something I need to learn about admin_level. If I use 8 I get (sometimes lots) of boundaries for e.g. BH and Quito. But using 8, none at all for Mexico City. If I go back to 2, I get boundaries for Mexico City. Feb 6, 2014 at 19:57
  • The meaning of the admin_level values depend on the country. For Brazil a value of 8 means municipalities and for Mexico it means city/town limit. Furthermore some administrative boundaries are still missing in OSM.
    – scai
    Feb 7, 2014 at 11:05
  • ah..... wiki.openstreetmap.org/wiki/Template:Admin_level_10 very useful Feb 7, 2014 at 20:47
0

I found another solution. Please add 'region' to you code.

boundary country : boundary=administrative AND (admin_level=2 OR admin_level=4) 
AND NOT natural=coastline
boundary province : boundary=administrative AND admin_level=6
boundary region    : relation[type=boundary AND boundary=administrative AND 
admin_level=4]
boundary municipal : boundary=administrative AND admin_level=8

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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