
Moin, in the style rules documentation in the WIKI it is stated, that a comparison of numeric quantities is possible, e.g. "maxspeed>=30". Is this really working? I tried the following example: In my osm file I had five ways: <way id='-9902' action='modify' visible='true'> <nd ref='-9900' /> <nd ref='-9901' /> <tag k='highway' v='null_null' /> <tag k='layer' v='-1' /> <tag k='name' v='layer=-1' /> </way> <way id='-9912' action='modify' visible='true'> <nd ref='-9910' /> <nd ref='-9911' /> <tag k='highway' v='null_null' /> <tag k='layer' v='0' /> <tag k='name' v='layer=0' /> </way> <way id='-9922' action='modify' visible='true'> <nd ref='-9920' /> <nd ref='-9921' /> <tag k='highway' v='null_null' /> <tag k='name' v='layer!=*' /> </way> <way id='-9932' action='modify' visible='true'> <nd ref='-9930' /> <nd ref='-9931' /> <tag k='highway' v='null_null' /> <tag k='layer' v='1' /> <tag k='name' v='layer=1' /> </way> <way id='-9952' action='modify' visible='true'> <nd ref='-9950' /> <nd ref='-9951' /> <tag k='highway' v='null_null' /> <tag k='layer' v='+1' /> <tag k='name' v='layer=+1' /> </way> And in my style the lines-file contained the following rules: highway=null_null & layer<0 [0x01 resolution 10] highway=null_null & layer=0 [0x02 resolution 10] highway=null_null & layer>0 [0x03 resolution 10] highway=null_null & layer='-1' [0x04 resolution 10] highway=null_null & layer='0' [0x05 resolution 10] highway=null_null & layer='1' [0x06 resolution 10] highway=null_null & layer='+1' [0x07 resolution 10] highway=null_null [0x08 resolution 10] As a result I expected the following conversions 9902 -> 0x01 9912 -> 0x02 9922 -> 0x08 9932 -> 0x03 9952 -> 0x03 Against my expectations the conversions were the following: 9902 -> 0x03 9912 -> 0x05 9922 -> 0x08 9932 -> 0x03 9952 -> 0x03 What is wrong? - My understanding of the style rules? - The documentation of the style rules? - The behaviour of mkgmap? Gruss Torsten

Hi, 2009/7/29 Torsten Leistikow <de_muur@gmx.de>
And in my style the lines-file contained the following rules: highway=null_null & layer<0 [0x01 resolution 10] highway=null_null & layer=0 [0x02 resolution 10] highway=null_null & layer>0 [0x03 resolution 10] highway=null_null & layer='-1' [0x04 resolution 10] highway=null_null & layer='0' [0x05 resolution 10] highway=null_null & layer='1' [0x06 resolution 10] highway=null_null & layer='+1' [0x07 resolution 10] highway=null_null [0x08 resolution 10]
try this:
highway=null_null & layer='0' [0x05 resolution 10] highway=null_null & layer=0 [0x02 resolution 10] highway=null_null & layer='1' [0x06 resolution 10] highway=null_null & layer='+1' [0x07 resolution 10] highway=null_null & layer='-1' [0x04 resolution 10] highway=null_null & layer<0 [0x01 resolution 10] highway=null_null & layer>0 [0x03 resolution 10] highway=null_null [0x08 resolution 10]
-- S pozdravem/Best regards Bc. Ondrej Novy Email: novy@ondrej.org Jabber: onovy@njs.netlab.cz ICQ: 115-674-713 Tel/Cell: +420 777 963 207

Ondrej Novy schrieb:
try this:
highway=null_null & layer='0' [0x05 resolution 10] highway=null_null & layer=0 [0x02 resolution 10] highway=null_null & layer='1' [0x06 resolution 10] highway=null_null & layer='+1' [0x07 resolution 10] highway=null_null & layer='-1' [0x04 resolution 10] highway=null_null & layer<0 [0x01 resolution 10] highway=null_null & layer>0 [0x03 resolution 10] highway=null_null [0x08 resolution 10]
Why? My example shall show, that the layer>0 and layer<0 rules are not working as expected. Putting this rules behind the other rules makes the whole test useless. Gruss Torsten

Hi
And in my style the lines-file contained the following rules: highway=null_null& layer<0 [0x01 resolution 10] highway=null_null& layer=0 [0x02 resolution 10] highway=null_null& layer>0 [0x03 resolution 10] highway=null_null& layer='-1' [0x04 resolution 10] highway=null_null& layer='0' [0x05 resolution 10] highway=null_null& layer='1' [0x06 resolution 10] highway=null_null& layer='+1' [0x07 resolution 10] highway=null_null [0x08 resolution 10]
As a result I expected the following conversions 9902 -> 0x01 9912 -> 0x02 9922 -> 0x08 9932 -> 0x03 9952 -> 0x03
Against my expectations the conversions were the following: 9902 -> 0x03 9912 -> 0x05 9922 -> 0x08 9932 -> 0x03 9952 -> 0x03
I've just written a test to duplicate this problem. I see the first unexpected result, but the not the second (9912). I suspect the first is just that negative numbers are not recognised. I would say that the second result would be very strange as the rules for 0x2 and 0x5 are exactly the same and the 0x2 one comes first and so should win.
What is wrong? - My understanding of the style rules? - The documentation of the style rules? - The behaviour of mkgmap?
The behaviour of mkgmap. But could you re-check the 9912 result as that one works as I (and you) would expect for me. Regards, ..Steve

Steve Ratcliffe schrieb:
I would say that the second result would be very strange as the rules for 0x2 and 0x5 are exactly the same and the 0x2 one comes first and so should win.
You 're right, I have to apologise for mixing the numbers. The actual conversions are as follows: 9902 -> 0x03 9912 -> 0x02 9922 -> 0x08 9932 -> 0x03 9952 -> 0x03 Gruss Torsten

On 29/07/09 20:53, Torsten Leistikow wrote:
Steve Ratcliffe schrieb:
I would say that the second result would be very strange as the rules for 0x2 and 0x5 are exactly the same and the 0x2 one comes first and so should win.
You 're right, I have to apologise for mixing the numbers.
OK, I've just committed a fix. Do you agree all is well with it? ..Steve
participants (3)
-
Ondrej Novy
-
Steve Ratcliffe
-
Torsten Leistikow