[mkgmap-dev] Multiple relation names
From Thorsten Kukuk kukuk at suse.de on Mon Mar 25 20:26:42 GMT 2013
On Mon, Mar 25, Geoff Sherlock wrote: > Hi Thorsten, > > Apologies, this is the first time I have worked with relations and I need > some clarity. > > Firstly: > >set route_display_name='${route_display_name}' > > > >This will overwrite the old route_display_name, you need to > >add it. > > I was under the impression this would add route_display_name to the line > setting it to route_display_name from the relation Yes, it adds route_display_name to the line with the route_display_name name of the relation, by overwriting the existing one. > Next: > Looking at your code it simply seems to concatenate relation tags: > route_blue_name, osmc:name, distance and name in various combinations > depending which exist. Correct. > I see osmc:name is an internal variable; is this not created internally by > mkgmap? Perhaps it stands for the concatenation of the names of relations > sharing this way, is this what you mean? No, osmc:name is an official OSM tag for hiking relations. In my case, route_blue_name is a new tag with all the names. Thorsten > -----Original Message----- > From: Thorsten Kukuk > Sent: Monday, March 25, 2013 7:41 PM > To: Development list for mkgmap > Subject: Re: [mkgmap-dev] Multiple relation names > > 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) > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev -- 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)
- Previous message: [mkgmap-dev] Multiple relation names
- Next message: [mkgmap-dev] Multiple relation names
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list