[OSM-dev] Getting admin_level=* from relations to render properly
Lennard
ldp at xs4all.nl
Wed Apr 28 08:00:14 BST 2010
On 28-4-2010 8:28, John Smith wrote:
> It occurred to me a few weeks ago that ways shouldn't be tagged with
> the admin_level, but instead use the information from relations, but
How did this occur to you? Tagging the ways is even explicitly
documented on the wiki.
> this doesn't work, in fact I removed the admin_level tag from a way
> that makes up part of a state border assuming the information would be
> used from the relation instead, but it just didn't render at all until
> I reinstate the admin_level on the way.
If the relation forms a closed loop, and is tagged as a boundary, it
should currently render.
> I haven't figured out what needs to be fixed in the mapnik style sheet
> to fix this, can anyone tell me what needs tweaking to fix this?
Should work currently. The major drawback to also drawing boundary
relations is that they can stack (in osm2pgsql+mapnik). Where a tagged
boundary way is part of n boundary relations, you will see n+1
overlapping lines in the render. IMO this is ugly, and you get no sense
of the actual admin levels involved.
Rendering just the boundary way makes for a clean border render, with a
predictable appearance. To this end, the wiki documentation describes
tagging the way with the highest order (lowest value) of admin_level. As
far as I'm aware, Tiles at Home already take this approach, and does not
render boundary relations.
I trust people will now bring the "don't tag for the renderer" mantra
into play, but in my mind, a boundary relation(*) describes the polygon,
so the administrative *area*, and the ways describe the demarcation
between administrative areas. Thus, it's the ways that should appear on
the rendered map, not the area.
*) Actually tagged as a multipolygon, because, hey, that's what it
really is.
--
Lennard
More information about the dev
mailing list