logo separator

[mkgmap-dev] relation rules in style

From Gleb Smirnoff glebius at glebius.int.ru on Tue Mar 31 10:54:55 BST 2009

  Hello, fellow openstreetmappers!

  I am trying to implement this rule, when making garmin maps:

- if a road doesn't have a name, and is a member of "relation=route,route=road",
  then let its name be the ref of this route.

  To start with, I've made the following rule in relations file:

type=route & route=road {
        apply {
# tried both variants: the commented out one and the active
#                set ref='${ref}';
                set ref='${route_ref}';
        }
}

  And rules in the lines file:

highway=trunk {
        name '^B${ref}' | '${name}'
        } [0x02 road_class=3 road_speed=5 resolution 8]
highway=trunk_link [0x08 road_class=3 road_speed=3 resolution 19]

highway=primary {
        name '^B${ref}' | '${name}'
        } [0x02 road_class=3 road_speed=4 resolution 10]
highway=primary_link [0x08 road_class=3 road_speed=3 resolution 19]

highway=secondary {
	.....

  And this doesn't work. Probably relations file is processed after the lines
file, so new tag values are applied too late. IMHO processing relations
before other style files will allow to create more advanced rules, like
above.

-- 
Totus tuus, Glebius.
GLEB-RIPE



More information about the mkgmap-dev mailing list