[mkgmap-dev] Numerical comparison of two tags
From Bernhard Hiller bhil at gmx.de on Fri Nov 1 12:50:01 GMT 2013
I'd like to set maxspeed to the minimum of maxspeed, maxspeed:forward, and maxspeed:backward. In my lines file, I use: |maxspeed:forward=*& maxspeed!=* { set maxspeed='${maxspeed:forward}' } maxspeed:forward=*& (maxspeed:forward<maxspeed) { set maxspeed='${maxspeed:forward}' } maxspeed:backward=*& maxspeed!=* { set maxspeed='${maxspeed:backward}' } maxspeed:backward=*& (maxspeed:backward<maxspeed) { set maxspeed='${maxspeed:backward}' }| That works only if exactly one tag is set. But when both forward and backward are available, I get the value of forward even if backward is less. An example is wayhttp://www.openstreetmap.org/browse/way/70594951. I played with additional / different rules, and my conclusion is that it is NOT POSSIBLE to compare the values of two tags with each other. For example, I tried: |highway=*& maxspeed!=* { set maxspeed=999 } maxspeed:forward=*& (maxspeed:forward<maxspeed) { set maxspeed='${maxspeed:forward}' } maxspeed:backward=*& (maxspeed:backward<maxspeed) { set maxspeed='${maxspeed:backward}' }| And you can guess the result: maxspeed=999, for that way with maxspeed:forward=60 and maxspeed:backward=40. Is my conclusion correct? And, if so, will there be a patch? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20131101/96a34a16/attachment.html>
- Previous message: [mkgmap-dev] [Patch v2] higher precision in coordinates
- Next message: [mkgmap-dev] Numerical comparison of two tags
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list