logo separator

[mkgmap-dev] maxspeed evaluation

From Bernd Weigelt weigelt.bernd at web.de on Fri Aug 14 10:36:24 BST 2015

Hi Gerd

When i test this new rule, i got this, i use the default inc/roadspeed

java.lang.NumberFormatException: Zero length string
        at java.lang.Integer.decode(Integer.java:1162)
        at java.lang.Byte.decode(Byte.java:277)
        at 
uk.me.parabola.mkgmap.osmstyle.ConvertedWay.recalcRoadSpeed(ConvertedWay.java:200)
        at 
uk.me.parabola.mkgmap.osmstyle.ConvertedWay.<init>(ConvertedWay.java:58)
        at 
uk.me.parabola.mkgmap.osmstyle.StyledConverter.addConvertedWay(StyledConverter.java:360)
        at 
uk.me.parabola.mkgmap.osmstyle.StyledConverter.access$400(StyledConverter.java:84)
        at 
uk.me.parabola.mkgmap.osmstyle.StyledConverter$WayTypeResult.add(StyledConverter.java:236)
        at 
uk.me.parabola.mkgmap.reader.osm.WatchableTypeResult.add(WatchableTypeResult.java:45)
        at 
uk.me.parabola.mkgmap.osmstyle.ExpressionRule.resolveType(ExpressionRule.java:85)
        at uk.me.parabola.mkgmap.osmstyle.RuleSet.resolveType(RuleSet.java:97)
        at 
uk.me.parabola.mkgmap.osmstyle.StyledConverter.convertWay(StyledConverter.java:294)
        at 
uk.me.parabola.mkgmap.reader.osm.ElementSaver.convert(ElementSaver.java:245)
        at 
uk.me.parabola.mkgmap.reader.osm.o5m.O5mBinMapDataSource.load(O5mBinMapDataSource.java:53)
        at 
uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.load(OsmMapDataSource.java:130)
        at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:154)
        at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:52)
        at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:255)
        at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:251)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)




Am Freitag, 14. August 2015, 09:44:10 schrieb Gerd Petermann:
> oops, the proposed rule was missing a plus sign:
> # make sure that mkgmap:road-speed is also set when mkgmap:road-speed-max
> (or -min) is set (mkgmap:road-speed-max=* | mkgmap:road-speed-min=*) &
> mkgmap:road-speed!=* { add mkgmap:road-speed=+0}
> 
> Gerd
> 
> 
> From: gpetermann_muenchen at hotmail.com
> To: mkgmap-dev at lists.mkgmap.org.uk
> Date: Fri, 14 Aug 2015 09:17:09 +0200
> Subject: Re: [mkgmap-dev] maxspeed evaluation
> 
> 
> 
> 
> Hi,
> 
> I think the java code works as documented in the style manual.
> 
> A possible solution in the style:
> Add the following two lines at the end of inc/roadspeed:
> # make sure that mkgmap:road-speed is also set when mkgmap:road-speed-max is
> set mkgmap:road-speed-max=* & mkgmap:road-speed!=* { add
> mkgmap:road-speed=0}
> 
> Alternative:
> Change the java code (and docu) to always evaluate mkgmap:road-speed-max
> (and -min)
> 
> Any comments?
> 
> Gerd
> 
> From: gpetermann_muenchen at hotmail.com
> To: mkgmap-dev at lists.mkgmap.org.uk
> Date: Fri, 14 Aug 2015 08:32:29 +0200
> Subject: [mkgmap-dev] maxspeed evaluation
> 
> 
> 
> 
> Hi all,
> 
> I think the rules in the default style don't work.
> Example: a way with two tags
> highway=tertiary and maxspeed=30
> will have the same attributes as one with
> highway=tertiary and maxspeed=70
> or one with
> highway=tertiary and maxspeed!=*
> although inc/roadspeed sets different
> values for mkgmap:road-speed-max.
> Reason:
> The tag mkgmap:road-speed-max=* is only evaluated
> by mkgmap when the tag mkgmap:road-speed=*.
> If mkgmap:road-speed is not set, the value in
> mkgmap:road-speed-max is completely ignored.
> 
> I guess this is not intended?
> 
> Gerd
> 
> 
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> 
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev



More information about the mkgmap-dev mailing list