logo separator

[mkgmap-dev] Bug in handling of bus stops

From GerdP gpetermann_muenchen at hotmail.com on Sun Feb 1 18:42:38 GMT 2015

Hi Adrian,

I was wrong, forget my previous post. You are right,
the rule 
(public_transport=platform | highway=bus_stop | railway=tram_stop |
railway=halt | railway=station)
& (ref=* | route_ref=*) {
  set ref='${ref|def:}(${route_ref})';
}

is divided into two parts:
((($public_transport='platform')&($ref=*|$route_ref=*)) |
((($highway='bus_stop')|(($railway='tram_stop')|(($railway='halt')|($railway='station'))))&($ref=*|$route_ref=*)))
{set ref='${ref}(${route_ref})';} 

((($highway='bus_stop')&($ref=*|$route_ref=*)) |
((($railway='tram_stop')|(($railway='halt')|($railway='station')))&($ref=*|$route_ref=*)))
{set ref='${ref}(${route_ref})';} 

and each one is executed. This is clearly not intended and should be fixed.

Gerd


GerdP wrote
> Hi Adrian,
> 
> I think the solution for the problem is an additional tag.
> Something like this in all 4 rules:
> (public_transport=platform | highway=bus_stop | railway=tram_stop |
> railway=halt | railway=station)
> & (ref=* | route_ref=*) & xxx_ref_processed!=1 {
>   set ref='${ref|def:}(${route_ref})';
>   set xxx_ref_processed=1
> }
> 
> Gerd
> A drian wrote
>> This bug was highlighted in r3334 when the test public_transport=platform
>> was added to these four rules in the default points style file (lines
>> 45-63):
>> 
>> (public_transport=platform | highway=bus_stop | railway=tram_stop |
>> railway=halt | railway=station)
>> & (ref=* | route_ref=*) {
>>   set ref='${ref|def:}(${route_ref})';
>> }
>> (public_transport=platform | highway=bus_stop | railway=tram_stop |
>> railway=halt | railway=station)
>> & lit=yes & (shelter=yes | covered=yes)
>> {
>>   set ref='${ref|def:}*';
>> }
>> (public_transport=platform | highway=bus_stop | railway=tram_stop |
>> railway=halt | railway=station)
>> & lit!=yes & (shelter=yes | covered=yes)
>> {
>>   set ref='${ref|def:}+';
>> }
>> (public_transport=platform | highway=bus_stop | railway=tram_stop |
>> railway=halt | railway=station)
>> & (shelter=no | covered=no)
>> {
>>   set ref='${ref|def:}-';
>> }
>> 
>> What happens is that if a node has two of the tags in the list
>> 
>> public_transport=platform | highway=bus_stop | railway=tram_stop |
>> railway=halt | railway=station
>> 
>> then the node is processed twice by each rule, so the route_ref and the
>> shelter marker (*, + or -) are doubled-up. Looking at
>> https://www.openstreetmap.org/node/1424432523 - this node is tagged
>> public_transport=platform and highway=bus_stop. Prior to r3334, the node
>> had only one tag that matched and there was no doubling-up. From r3334
>> onwards, there are two tags that match and the result is Agglo Hérault
>> Méditerranée: (1;2;3;4;5,4,4,3,3)(1;2;3;4;5,4,4,3,3)++ Gare SNCF. I
>> believe it is not intended that style rules should work in this way,
>> therefore it is a bug in the code. In which case it is a question for the
>> Java experts.
>> 
>> Adrian
>> 
>>  		 	   		  
>> _______________________________________________
>> mkgmap-dev mailing list

>> mkgmap-dev at .org

>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev





--
View this message in context: http://gis.19327.n5.nabble.com/Bug-in-handling-of-bus-stops-tp5832099p5832147.html
Sent from the Mkgmap Development mailing list archive at Nabble.com.


More information about the mkgmap-dev mailing list