[Tilesathome] RFC: Symbols rendering

Jiri Klement jiri.klement at gmail.com
Sat Sep 13 08:27:22 BST 2008


>> 2) Draw icon in area center only when there is no node inside of area
>> with the same tags.
>
> I wouldn't bother about this, I've mostly seen this where you have a
> parking space that's input twice, as both area and node. That was
> basically a renderer workaround for before the renderers did symbols
> for areas.

Yes, it's workaround and if rendering rules stayed the same as now, it
will be unnecessary. But I was thinking I will add support for more
features applicable to both nodes and areas. For example big
place_of_worship is usually tagged as both node and area. If I change
rendering rules to add area symbol, I'll get thousands of churches
with two icons.

> If we want to do anything about these nodes at all I'd rather convert
> them into labels using the relation, thus actually fixing the data
> instead of adding a workaround to handle an old workaround.

This will be cleaner solution, but I'm afraid there is already too much data.

>> The algorithm should work like this:
>
> Why not just put something like this in areaCenterWrapper?
> if way is member of label relation with role object
>    return label member of relation
> else
>    <current logic>

This will work if there is only one label and one object in relation
(as described in current proposal). But I think it would better to
allow arbitrary number of items. For example you might want two
symbols for big area, or only one symbol for two small adjancent areas
of the same type.

>> Checking whether point is inside of polygon is quite simple, it should
>> be possible to do in xslt in reasonable time. Anyway I'm planing to
>> extend area-center preprocessor help osmarender with it.
>
> Point-in-polygon is not all that simple, it's definitely not cheap
> (pretty much no matter how you implement it).

I think it's quite cheap. You get points in boundbox, it should be
just one XPath query. Then you make horizontal line going through
every point and count number of intersections with area edges. If the
number is odd, then point is inside of polygon.

> Could we please keep this inside osmarender, where it's trivial to do
> it, and not make this something that will only work with an external
> preprocessor?

Sure, I'm going to do that so osmarender can still work without
preprocessor. If I use preprocessor, that only to speed it up.




More information about the Tilesathome mailing list