[OSM-talk] Inconsistencies in Mapnik render style for churches
n_wenzel at gmx.net
Wed Sep 3 21:16:22 BST 2008
Well, that was a long and illustrative answer. No need to "fix" this, I
was just curious if this was a bug or if this - let's call it
non-obvious - behaviour was intended.
As stated before, I was just curious and don't consider this important.
Jon Burgess wrote:
> On Wed, 2008-09-03 at 21:26 +0200, Norbert Wenzel wrote:
>> I was just wondering because there are two churches in the same
>> region rendering differently. The whole region should have been
>> rerendered today.
>> The one "Pfarrzentrum Rif St. Albrecht" (the left one) is a catholic
>> church which shows as a simple square in zoomlevel 16 and is rendered
>> with a cross in all higher zoom levels. The name is only rendered in
>> zoom level 18. I
>> The other one is only tagged as christian, since I do not know it well
>> enough to tag the denomination correctly. (It is a smaller free church.)
>> This on is rendered always with the cross, but the name is only shown in
>> z17 and disappears again in z18.
>> Shouldn't both churches be rendered the same in every zoom level, since
>> they only differ on the denomination (and of course the name) property?
>> Or are that different rendering styles intentional?
> You are correct they should be rendered the consistently. Both the
> different icon and lack of text label have the same underlying reason --
> collision avoidance.
> On z18 the text label of the church is omitted due to a clash with the
> road name.
> The square icon is a little harder to understand. If you look at the
> osm.xml style for the church icon then you might notice that it cheats
> slightly in choosing which icon to render. In pseudo-code the rules
> if amenity=place_of_worship and religion=christian then render christian
> if amenity=place_of_worship and religion=muslim then render muslim
> ... some more religion types omitted
> if amenity=place_of_worship then render generic church (square).
> Notice there are no 'else' clauses to prevent multiple symbols being
> rendered. The rules rely on the collision avoidance in Mapnik which will
> normally mean that if a Christian church symbol was rendered on the spot
> then the generic church square won't appear even though the 'if'
> condition is met.
> What has happened with this church at z16 is that the recycling logo has
> clashed with the Christian church symbol so that was not rendered. The
> generic square symbol is slightly smaller so that just avoided clashing
> with the recycling symbol and was rendered instead.
> It can be fixed by adding lots of extra tests to the generic church
> filter (saying ... and not religion=christian and not
> religion=muslim ... etc). It makes the rule look a little bit ugly and
> more tricky to maintain so I avoided doing that before. I didn't think
> of the case that one symbol might clash and another might not.
>> talk mailing list
>> talk at openstreetmap.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3233 bytes
Desc: S/MIME Cryptographic Signature
More information about the talk