[mkgmap-dev] sorting the values?
Hi In my styles, i try to disable routing for really small ways with this rules highway=* & width ~'.*cm' { delete width } highway=* & width ~'.*m' { set width='${width|part:"m"}'; } highway=* & width ~'.*;.*' { set width='${width|subst:",=>."}'; } highway=* & maxwidth ~'.*cm' { delete maxwidth } highway=* & maxwidth ~'.*m' { set maxwidth='${maxwidth|part:"m"}'; } highway=* & maxwidth ~'.*,.*' { set maxwidth='${maxwidth|subst:",=>."}'; } highway=* & highway!=service & highway!=track & highway!=path & highway!=cycleway & highway!=footway & highway!=pedestrian & (maxwidth<2.0 | width<2.0) { set mkgmap:throughroute=no; } highway=* & (maxwidth<1.0 | width<1.0) { add foot=yes; add access=no; } this seems to work in most cases, but i found some ways like this ways with semicolon separated values https://www.openstreetmap.org/way/235493829 https://www.openstreetmap.org/way/47861325 Is it possible, to sort the values and use only the smallest/greatest value? Bernd ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] sorting the values?
Just to add to the complexity, I notice that the values in the ways you reference use a comma as decimal separator, not a dot as per OSM standard. So even if you split the values, you may still not get the result you expect. Is there a lot of this? Does mkgmap handle 2.5 and 2,5 the same in a numeric context? //colin On 2016-03-04 10:15, Bernd Weigelt wrote: > this seems to work in most cases, but i found some ways like this ways with > semicolon separated values > > https://www.openstreetmap.org/way/235493829 > https://www.openstreetmap.org/way/47861325 > > Is it possible, to sort the values and use only the smallest/greatest value? > > Bernd > > ___ > mkgmap-dev mailing list > mkgmap-dev@lists.mkgmap.org.uk > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] sorting the values?
Hi Colin You're right, there was an error ;-) found it some minutes ago, too. This rules are very new in my style. i don't know, how Mkgmap handle a comma, i try to use the secure way and change it in my filter file. Bernd Am Freitag, 4. März 2016, 10:24:42 CET schrieb Colin Smale: > Just to add to the complexity, I notice that the values in the ways you > reference use a comma as decimal separator, not a dot as per OSM > standard. So even if you split the values, you may still not get the > result you expect. > > Is there a lot of this? Does mkgmap handle 2.5 and 2,5 the same in a > numeric context? > > //colin ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev