
This rule does not work: highway ~ '(secondary|tertiary|unclassified|residential|minor|living_street|service)' & oneway=* & (cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track | oneway:bicycle=no | bicycle:oneway=no ) {set bicycle=no; set mkgmap:cycleway=yes} Only if I put oneway=* first, it works, why? oneway=* & highway ~ '(secondary|tertiary|unclassified|residential|minor|living_street|service)' & ( cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track | oneway:bicycle=no | bicycle:oneway=no ) {set bicycle=no; set mkgmap:cycleway=yes} The error message is: Error in style: Error: (lines:119): Invalid rule expression: (((($cycleway='opposite')|(($cycleway='opposite_lane')|(($cycleway='opposite_track')|(($oneway:bicycle='no')|($bicycle:oneway='no')))))&$oneway=*)&($highway~'(secondary|tertiary|unclassified|residential|minor|living_street|service)'))

On 27/03/14 08:50, Minko wrote:
Only if I put oneway=* first, it works, why?
Its a good workaround for the bug, since it should go first. But mkgmap is supposed to be able to re-arrange the terms so that it goes first itself and that is failing in this case. I will add your example as a test and fix it. ..Steve

Hi Minko
This rule does not work: highway ~ '(secondary|tertiary|unclassified|residential|minor|living_street|service)' & oneway=* & (cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track | oneway:bicycle=no | bicycle:oneway=no ) {set bicycle=no; set mkgmap:cycleway=yes}
I have a fix for this problem attached. ..Steve

Thanks for fixing this Steve. Can't test it because Im not familiar with patching mkgmap.
Hi Minko
This rule does not work: highway ~ '(secondary|tertiary|unclassified|residential|minor|living_street|service)' & oneway=* & (cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track | oneway:bicycle=no | bicycle:oneway=no ) {set bicycle=no; set mkgmap:cycleway=yes}
I have a fix for this problem attached.
..Steve

On 28/03/14 12:17, Minko wrote:
Thanks for fixing this Steve. Can't test it because Im not familiar with patching mkgmap.
If you would like to test it here is a pre-built one: http://files.mkgmap.org.uk/download/194/mkgmap.jar Cheers ..Steve

Steve, Your patch now detects this line as invalid string, the trunk version does not complain here: highway=* & bridge!=* & (mtb:scale>0 | mtb:scale='0+' | tracktype ~ 'grade[2-6]' | sac_scale ~ '.*(mountain|alpine)_hiking' | sport=via_ferrata) { add mkgmap:unpaved=1; set motorcar=no; } Error in style: Error: (lines:95): Invalid rule expression: ((($mtb:scale>0)|(($mtb:scale='0+')|(($tracktype~'grade[2-6]')|(($sac_scale~'.*(mountain|alpine)_hiking')|($sport='via_ferrata')))))&($bridge!=*&$highway=*))
I have a fix for this problem attached.
I've noticed that the fix causes an error with the floodblocker style. So this needs more work.
..Steve

Minko
Your patch now detects this line as invalid string, the trunk version does not complain here:
highway=* & bridge!=* & (mtb:scale>0 | mtb:scale='0+' | tracktype ~ 'grade[2-6]' | sac_scale ~ '.*(mountain|alpine)_hiking' | sport=via_ferrata) { add mkgmap:unpaved=1; set motorcar=no; }
Thanks, I've added this as a test. Its a little more complex than I thought - still working on it! ..Steve

Hi New patch for this problem. It fixes all the cases that have been found so far. Pre-built jar file here: http://files.mkgmap.org.uk/download/196/mkgmap.jar ..Steve

Thanks Steve, Seems like it is working now with my styles.
New patch for this problem. It fixes all the cases that have been found so far.
Pre-built jar file here: http://files.mkgmap.org.uk/download/196/mkgmap.jar
..Steve
participants (2)
-
Minko
-
Steve Ratcliffe