[PATCH] Display road name instead of ref in routing directions

The attached patch causes road names (instead of refs) to be displayed in routing directions. That is, you will get "Turn right onto Weseler Strasse (B58)" instead of just "Turn right onto B58". If you use a style other than the default, you will have to add a "add display_name = '${name} (${ref})'" statement to the appropriate lines in your style file. Example: highway=secondary {name '${ref|highway-symbol:oval} ${name}' | '${ref|highway-symbol:oval}' | '${name}'; add display_name = '${name} (${ref})' } The patch reads the display_name tag according to the style file, and writes it as a second label. This second label will be used for routing directions, at least in the case where a highway symbol is displayed on the map for the road in question. - In the patch, display_name is set in the style file to "Name (Ref)". You may adjust this to your liking. It may be expedient to simply display just the name without the ref in brackets. Since this may significantly improve routing directions in certain circumstances, I would appreciate your feedback. Some additional comments: - display_name may not be the best name for the style file tag. - The patch to StyledConverter.java simply prepends the display_name to the list of references. This takes advantage of the side-effect that the refs are all written sequentially as additional labels. It might be a cleaner approach to directly write the display name as a secondary label, but the patch was a very quick and cheap way of testing this concept. - The display_name will also be displayed in Mapsource when you cursor over the road with the mouse. Cheers.

Hi Clinton, I have committed the Java part of your patch so that people can easily try it out with their own styles. The patch to the default style file can be applied when it is "approved" by testers. Cheers, Mark

Hi, Clinton, Clinton Gladstone wrotes: <mailto:mkgmap-dev%40lists.mkgmap.org.uk?Subject=Re:%20%5Bmkgmap-dev%5D%20%5BPATCH%5D%20Display%20road%20name%20instead%20of%20ref%20in%20routing%0A%09directions&In-Reply-To=%3C4dda9d8f0910280501k761f41bdn5e8f399bbc75c1bc%40mail.gmail.com%3E> *on* /Wed Oct 28 12:01:24 GMT 2009/
Since this may significantly improve routing directions in certain circumstances, I would appreciate your feedback.
Actually i can't see any improvements in routing. The routing seems to be the same , not worse and not better as before. But i will pay attention of it.
Some additional comments:
- display_name may not be the best name for the style file tag.
hmh, something like "turninstruction_name" would be more meaningful but maybe a little bit long.
- The patch to StyledConverter.java simply prepends the display_name to the list of references. This takes advantage of the side-effect that the refs are all written sequentially as additional labels. It might be a cleaner approach to directly write the display name as a secondary label, but the patch was a very quick and cheap way of testing this concept.
Sorry but i don't know whats't the pros/cons of the both ways. I can only say that the patch works for me(as far as i can see in the moment) and with the flexibility given in the style file it's a prakticable + good way to deal with the label. cheers Gert

On Wed, Oct 28, 2009 at 9:52 PM, Gert Münzel <Gert.Muenzel@netcologne.de> wrote:
Actually i can't see any improvements in routing. The routing seems to be the same , not worse and not better as before. But i will pay attention of it.
The routing itself should not change with this patch, but the routing description should change. That is, instead of instructions such as the following, - Take the 2nd right onto K 4256 - Turn right onto K 4256 you should get the following, - Take the 2nd right onto Bahnhofstrasse (K 4256) - Turn right onto Nusslocher Strasse (K 4256) but only in cases where a street has both a name and a ref (and a highway symbol, I think). Cheers.

ok, thanks, it was only a misunderstanding of "routing directions", simply caused by my bad english. The rest was already clear. cheers Gert

Clinton Gladstone wrote: highway=secondary {name '${ref|highway-symbol:oval} ${name}' |
'${ref|highway-symbol:oval}' | '${name}'; add display_name = '${name} (${ref})' }
I checked the routing description in Mapsource and on my Etrex (without driving the route). It looks good. In Germany the label of the primaries is shown on the road signs (B57, B58...), but not the labels of the secondaries (like L237, K39 and so on). How is this handled in other countries? Ralf

Ralf Reimann wrote:
Clinton Gladstone wrote:
highway=secondary {name '${ref|highway-symbol:oval} ${name}' | '${ref|highway-symbol:oval}' | '${name}'; add display_name = '${name} (${ref})' }
I checked the routing description in Mapsource and on my Etrex (without driving the route). It looks good.
In Germany the label of the primaries is shown on the road signs (B57, B58...), but not the labels of the secondaries (like L237, K39 and so on). How is this handled in other countries? This is not related to type of road, but type of symbol. :box and :hbox cannot display certain types of labels (see older messages from me) - other like :oval have no restrictions and you can input more or less whatever you like.
Solution: a) don't use :box and :hbox b) cut values before putting them into :box and :hbox so that they will actually display ...
Ralf
------------------------------------------------------------------------
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

On Oct 30, 2009, at 23:56, Felix Hartmann wrote:
In Germany the label of the primaries is shown on the road signs (B57, B58...), but not the labels of the secondaries (like L237, K39 and so on). How is this handled in other countries? This is not related to type of road, but type of symbol. :box and :hbox cannot display certain types of labels (see older messages from me) - other like :oval have no restrictions and you can input more or less whatever you like.
I think Ralf was talking about the "real world" here, not the one in our GPS devices. ;-) That is, when you are outside and looking at the physical signs on the road, the 'ref' number of secondary roads does not usually appear on the signs, however the 'ref' of primary highways is generally printed on the signs (at least in Germany). This makes a difference for routing directions: when should the ref be used and when should the name be used? - For motorways, we almost always want the ref: A35 instead of "Autoroute des Cigognes"; A1 instead of "Autostrada del Sole". - This is also probably true for trunk roads. - For primary highways, either the ref or the name or both could be most appropriate: "B58", or "Weseler Strasse", or "Weseler Strasse (B58)"? - Generally for secondary and lower roads, we want the name; the ref is secondary: "Bahnhofstrasse" instead of "K 4256". And the question is, is this also true for other countries?

2009/10/31 Clinton Gladstone <clinton.gladstone@googlemail.com>
And the question is, is this also true for other countries?
Yes Clinton, your English is much much better than mine. :-) Really good translation. ;-) Ralf

0> In article <234CD3B7-375C-4DAB-873F-84002B87441A@googlemail.com>, 0> Clinton Gladstone <URL:mailto:clinton.gladstone@googlemail.com> ("Clinton") wrote: Clinton> That is, when you are outside and looking at the physical signs Clinton> on the road, the 'ref' number of secondary roads does not usually Clinton> appear on the signs, however the 'ref' of primary highways is Clinton> generally printed on the signs (at least in Germany). In UK, the road number is used down to secondary; tertiary and lower should not have numbers visible on the signage (yes, exceptions exist, but I'm quoting the rules). So I have the following in my 'lines' file: /-------- | highway=motorway {name '${ref|highway-symbol:hbox} ${name}' | '${ref|highway-symbol:hbox}' | '${name}' } | highway=trunk {name '${ref|highway-symbol:hbox} ${name}' | '${ref|highway-symbol:hbox}' | '${name}' } | highway=primary {name '${ref|highway-symbol:box} ${name}' | '${ref|highway-symbol:box}' | '${name}' } | highway=secondary {name '${ref|highway-symbol:oval} ${name}' | '${ref|highway-symbol:oval}' | '${name}' } | highway=* {name '${name}' } \-------- so that lower-class roads are only named, not also numbered.

And the question is, is this also true for other countries?
Here in the U.S. (or should I say in Michigan as it is certainly different in other states), most of the time the ref is shown but it town/urban areas it is often the road name that is used. The display of name (ref) sounds like a good compromise. I will definitely try that new approach. Thanks, N.
participants (7)
-
Clinton Gladstone
-
Felix Hartmann
-
Gert Münzel
-
Mark Burton
-
Nakor
-
Ralf Reimann
-
Toby Speight