Multiple relation names

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). 2. It seems that when a way is already named the way name is not changed to the name of the relation. So for 1 – is there any way of showing multiple names? And 2 – Why is the name not changed? I would appreciate any help forthcoming. Geoff.

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)

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 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. 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? Cheers, Geoff. -----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@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

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@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@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)

OK, I think I see how the concatenation is done now. I changed my lines file to thus (relation tag route_display_name is set in relations): type=route & route_display_name=* { apply { set route_display_name='$(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} But I do not get a comma separated list of names, still just a single name showing in Mapsource or Basecamp - and without a comma. Also why does this does this not replace names already defined for a track/bridleway etc!!!!???? It only gets set if the name is not already set. Cheers, Geoff. -----Original Message----- From: Thorsten Kukuk Sent: Monday, March 25, 2013 8:26 PM To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] Multiple relation names 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@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@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)
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

On Tue, Mar 26, 2013 at 05:44:05PM -0000, Geoff Sherlock wrote:
OK, I think I see how the concatenation is done now.
I changed my lines file to thus (relation tag route_display_name is set in relations):
type=route & route_display_name=* { apply { set route_display_name='$(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}
But I do not get a comma separated list of names, still just a single name showing in Mapsource or Basecamp - and without a comma.
Also why does this does this not replace names already defined for a track/bridleway etc!!!!???? It only gets set if the name is not already set.
Did you have a look at the the default style? It sets bus route $ref in highway=bus_stop relations. It also sets the boundary names on boundary lines (not sure if that is still being used). But, let me quote it: (type=boundary | type=multipolygon) & boundary=administrative & name=* { apply { set mkgmap:boundary_name='$(mkgmap:boundary_name)/${name}' | '${name}'; } } The ${name} refers to the relation attribute. The 'set' and $(mkgmap:boundary_name) [note $(...) instead of ${...}] refers to the relation member. This command will do one of two things: (1) if 'mkgmap:boundary_name' is not already set on the member, assigns it to the 'name' of the relation (2) otherwise, appends '/' and the relation name to mkgmap:boundary_name This parameter is used in the default/lines file to assign a name for the boundary: boundary=administrative { name '${mkgmap:boundary_name}' } Technically, I guess you could write something like this directly: apply { set name='$(name)/${name}' | '${name}' } However, this could be a bad idea, because it would overwrite the name of any relation member, such as a section of a river or a highway (if they are part of the relation). Also, have a look at the styles/default/routes-* relations. I used to build a multi-layer map that had --style=routes-bus and --style=routes-bicycle in separate transparent layers, selectable on the maps menu in the device. Best regards, Marko

Hi Marko, Yes I understand the concept now, I just can't get it to work! I have simplified the lines file now, but no change: type=route & name=* { apply { set route_display_name='$(route_display_name)/${name}'|'${name}'; } } (highway=track | highway=bridleway | highway=cycleway | highway=footway) & route_display_name=* {set name='${route_display_name}'} Still only showing one name when I know there are two, still not setting the name to the route name if the way name is already set. Both in Garmin apps and on device. If I replace route_display_name with just name, and remove the line that sets the way name; it does not change the way name at all??? Downloaded and tried with mkgmap-r2538 with no success either. Thanks for your help and information, but I feel like I'm banging my head against a wall with this one. Think I will give up on it for now, at least I am showing more route names than before; I'll give it another try at a later date - although I really can't see anything wrong in the style?!?!? Thanks again, Geoff. -----Original Message----- From: MarkoMäkelä Sent: Tuesday, March 26, 2013 6:39 PM To: Development list for mkgmap Subject: Re: [mkgmap-dev] Multiple relation names On Tue, Mar 26, 2013 at 05:44:05PM -0000, Geoff Sherlock wrote:
OK, I think I see how the concatenation is done now.
I changed my lines file to thus (relation tag route_display_name is set in relations):
type=route & route_display_name=* { apply { set route_display_name='$(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}
But I do not get a comma separated list of names, still just a single name showing in Mapsource or Basecamp - and without a comma.
Also why does this does this not replace names already defined for a track/bridleway etc!!!!???? It only gets set if the name is not already set.
Did you have a look at the the default style? It sets bus route $ref in highway=bus_stop relations. It also sets the boundary names on boundary lines (not sure if that is still being used). But, let me quote it: (type=boundary | type=multipolygon) & boundary=administrative & name=* { apply { set mkgmap:boundary_name='$(mkgmap:boundary_name)/${name}' | '${name}'; } } The ${name} refers to the relation attribute. The 'set' and $(mkgmap:boundary_name) [note $(...) instead of ${...}] refers to the relation member. This command will do one of two things: (1) if 'mkgmap:boundary_name' is not already set on the member, assigns it to the 'name' of the relation (2) otherwise, appends '/' and the relation name to mkgmap:boundary_name This parameter is used in the default/lines file to assign a name for the boundary: boundary=administrative { name '${mkgmap:boundary_name}' } Technically, I guess you could write something like this directly: apply { set name='$(name)/${name}' | '${name}' } However, this could be a bad idea, because it would overwrite the name of any relation member, such as a section of a river or a highway (if they are part of the relation). Also, have a look at the styles/default/routes-* relations. I used to build a multi-layer map that had --style=routes-bus and --style=routes-bicycle in separate transparent layers, selectable on the maps menu in the device. Best regards, Marko _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Geoff,
Yes I understand the concept now, I just can't get it to work! I have simplified the lines file now, but no change:
type=route & name=* { apply { set route_display_name='$(route_display_name)/${name}'|'${name}'; } }
The above should be in the relations file.
(highway=track | highway=bridleway | highway=cycleway | highway=footway) & route_display_name=* {set name='${route_display_name}'}
This one should be in the lines file, before any matching highway=* rules.
If I replace route_display_name with just name, and remove the line that sets the way name; it does not change the way name at all???
Can you try with a small map extract that you download with JOSM and save as *.osm file? And can you try this with a minimal style, containing as few rules as possible? Could it depend on the order in which the relations and ways are written in the *.osm file? If it does, that would be a bug in mkgmap. And the bug might exist only in *.osm not in *.osm.pbf or vice versa. So, you might want to try converting from one format to another with Osmosis or some other tool. If you are modifying the default style, you will have to run 'ant dist' to put the modified style to the mkgmap.jar. (Sorry, this may be stupid advice, but you did not write which exact steps you followed, so I have to extrapolate and make assumptions.) Best regards, Marko

Hi Marko, I tried moving the first part to the relations file and saw no route names come up. Reverted it to how it was, but I have tried to make it like the bus route example in the style documentation as well (so more filtering for walking routes, setting route=hiking etc in relations). I've downloaded all the test data, config etc I'm using to the link below, this is for a very small area. https://docs.google.com/folder/d/0BwtvifQlqjWyaVJYMDFJeDFnaTA/edit?usp=shari... I think if you copy this to the directory containing mkgmap.jar and run the bat file (in windows), all should compile - but I may have missed removing some directory names. I have also attached a waypoint gpx file showing a route I know to belong to two relations and is not named. If you, or anyone else wants to look, please do. I've been so caught up on this problem I've only just realised I'm missing the England world cup qualifier!!! Cheers, Geoff. -----Original Message----- From: MarkoMäkelä Sent: Tuesday, March 26, 2013 8:24 PM To: Development list for mkgmap Subject: Re: [mkgmap-dev] Multiple relation names Hi Geoff,
Yes I understand the concept now, I just can't get it to work! I have simplified the lines file now, but no change:
type=route & name=* { apply { set route_display_name='$(route_display_name)/${name}'|'${name}'; } }
The above should be in the relations file.
(highway=track | highway=bridleway | highway=cycleway | highway=footway) & route_display_name=* {set name='${route_display_name}'}
This one should be in the lines file, before any matching highway=* rules.
If I replace route_display_name with just name, and remove the line that sets the way name; it does not change the way name at all???
Can you try with a small map extract that you download with JOSM and save as *.osm file? And can you try this with a minimal style, containing as few rules as possible? Could it depend on the order in which the relations and ways are written in the *.osm file? If it does, that would be a bug in mkgmap. And the bug might exist only in *.osm not in *.osm.pbf or vice versa. So, you might want to try converting from one format to another with Osmosis or some other tool. If you are modifying the default style, you will have to run 'ant dist' to put the modified style to the mkgmap.jar. (Sorry, this may be stupid advice, but you did not write which exact steps you followed, so I have to extrapolate and make assumptions.) Best regards, Marko _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

OK, I managed to sort it out. Marko was right and the name combination should have been in the relations file. Now I have the following set in relations: type=route & name=* & (route=bicycle | route=hiking | route=mtb | route=walking | route=piste | route=horse | route=foot) { apply { set route=hiking; set route_name='$(route_name)/${name}'|'${name}' } } And the following in lines style: (highway=track | highway=bridleway | highway=cycleway | highway=footway | highway=byway | highway=path) & route=hiking {name '${route_name}' | '${name}'} And I am now seeing combined route names in Mapsource :-) Thanks for all your help Marko and Thorsten. Cheers, Geoff. -----Original Message----- From: MarkoMäkelä Sent: Tuesday, March 26, 2013 8:24 PM To: Development list for mkgmap Subject: Re: [mkgmap-dev] Multiple relation names Hi Geoff,
Yes I understand the concept now, I just can't get it to work! I have simplified the lines file now, but no change:
type=route & name=* { apply { set route_display_name='$(route_display_name)/${name}'|'${name}'; } }
The above should be in the relations file.
(highway=track | highway=bridleway | highway=cycleway | highway=footway) & route_display_name=* {set name='${route_display_name}'}
This one should be in the lines file, before any matching highway=* rules.
If I replace route_display_name with just name, and remove the line that sets the way name; it does not change the way name at all???
Can you try with a small map extract that you download with JOSM and save as *.osm file? And can you try this with a minimal style, containing as few rules as possible? Could it depend on the order in which the relations and ways are written in the *.osm file? If it does, that would be a bug in mkgmap. And the bug might exist only in *.osm not in *.osm.pbf or vice versa. So, you might want to try converting from one format to another with Osmosis or some other tool. If you are modifying the default style, you will have to run 'ant dist' to put the modified style to the mkgmap.jar. (Sorry, this may be stupid advice, but you did not write which exact steps you followed, so I have to extrapolate and make assumptions.) Best regards, Marko _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

On Fri, Mar 29, 2013 at 10:47:17AM -0000, Geoff Sherlock wrote:
OK, I managed to sort it out. Marko was right and the name combination should have been in the relations file.
I'm glad you sorted it out. I wrote the $(var) syntax exactly to address this problem (multiple lines belonging to the same relation). For what it is worth, I noticed a similar problem being discussed on the OsmAnd mailing list a few weeks ago, and their solution seemed to be something ad-hoc. It should be obvious that a way can belong to multiple routes. Best regards, Marko

Hi Thorsten, I assume the example you gave was from your lines style file. Could I ask what you do in the relations style file as well, and do you see the comma separated list in Mapsource/Basecamp and on your device? Thanks, Geoff. -----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@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

On Fri, Mar 29, Geoff Sherlock wrote:
Hi Thorsten,
I assume the example you gave was from your lines style file. Could I ask what you do in the relations style file as well, and do you see the comma separated list in Mapsource/Basecamp and on your device?
No, this is of course from the releation file, this code wouldn't make sense in the lines file. Thorsten
Thanks, Geoff.
-----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@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@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)
participants (3)
-
Geoff Sherlock
-
Marko Mäkelä
-
Thorsten Kukuk