logo separator

[mkgmap-dev] Multiple relation names

From Thorsten Kukuk kukuk at suse.de on Mon Mar 25 19:41:08 GMT 2013

On Mon, Mar 25, Geoff Sherlock wrote:

> I’m sure I’ve read on this list that this is possible. For walking maps I would the way name to consist of all possible related names for that way. For instance for the relations named ‘Icknield Way’ and ‘Chiltern Way’, I would like a way that is contained in both relations to be named ‘Icknield Way Chiltern Way’.
> 
> Currently I am displaying names for relations using the following in the relations style file:
> type=route {
>     apply {
>         set route_display_name='${name}';
>     }
> }
> 
> Then I changed the names of tracks, bridleways, cycleways and footways in the lines file with:
> type=route & route_display_name=* {
>     apply {
>         set route_display_name='${route_display_name}'
>     }
> }
> (highway=track | highway=bridleway | highway=cycleway | highway=footway) & route_display_name=* {set name='${route_display_name}' continue with_actions} 
> 
> This is working fine except for two points:
> 
> 1. Where a way shares two relations only one name is shown (presumably the last alphabetically).


set route_display_name='${route_display_name}'

This will overwrite the old route_display_name, you need to
add it.
For example what I do:
(route=foot | route=hiking) & 
        (osmc:symbol=blue | osmc:symbol ~ 'blue:.*') &
        (name=* | osmc:name=*) &
        (network=iwn | network=nwn | network=rwn | network=lwn) {
        apply { set route_blue='$(route_blue):${osmc:symbol}'|
                                 '${osmc:symbol}';
                set route_blue_type='${network}';
                set route_blue_name=
                    '$(route_blue_name), ${osmc:name} (${distance})' |
                    '$(route_blue_name), ${osmc:name}' |
                    '${osmc:name} (${distance})' | '${osmc:name} |'
                    '$(route_blue_name), ${name} (${distance})' |
                    '$(route_blue_name), ${name}' |
                    '${name} (${distance})' | '${name}'
              }
}

So route_blue_name contains afterwards a comma seperated list 
with all osmc:name of all routes.

  Thorsten

-- 
Thorsten Kukuk, Project Manager/Release Manager SLES
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)


More information about the mkgmap-dev mailing list