[Tilesathome] RFC: Symbols rendering

Jiri Klement jiri.klement at gmail.com
Fri Sep 12 12:17:10 BST 2008


Hi,

I've been thinking about how to improve rendering of area with icons
in osmarender. Currently there is no way how to specify where icon
should be placed.

Two things can be implemented:

1) Support label relation -
http://wiki.openstreetmap.org/index.php/Relations/Proposed/Label
2) Draw icon in area center only when there is no node inside of area
with the same tags.

The algorithm should work like this:

for all nodes in label relation
    draw node with information taken from area which is in label
relation with node

for all other nodes
   draw as usuall

for all ways
    if area has label relation, then do nothing
    if there is point inside of area with the same type, then do nothing
    else draw icon in the center of the area

Osmarender must somehow know if node inside of area has the same type
as the area. One way may be add new attribute to <areaSymbol> -
nodeType. It will be reference to rule(s) which accept node of the
same type as area.

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.

What do you think about the proposal? Is it worth implementing? Is
there something I should do differently?

--
Jiri




More information about the Tilesathome mailing list