<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi WanMil,<br><br>thanks. The code still used Coord.equals() in one place and in this special case, the <br>Node <br>http://www.openstreetmap.org/node/1707492378<br>was too close for the low precision.<br>I've committed r3004 to fix this problem. <br><br>Gerd<br><br><div>> Date: Tue, 4 Feb 2014 22:41:51 +0100<br>> From: wmgcnfg@web.de<br>> To: mkgmap-dev@lists.mkgmap.org.uk<br>> Subject: Re: [mkgmap-dev] Problem with turn restriction<br>> <br>> Hi Gerd,<br>> <br>> the problem was caused by the node <br>> http://www.openstreetmap.org/node/1707492416. I am using the <br>> --link-pois-to-ways option.<br>> <br>> WanMil<br>> <br>> > thanks. I think the code in RoadNetwork should be changed to print<br>> > error messages in such a case instead of ending with an NPE or assertion.<br>> ><br>> > Gerd<br>> ><br>> > > Date: Tue, 4 Feb 2014 22:06:13 +0100<br>> > > From: wmgcnfg@web.de<br>> > > To: mkgmap-dev@lists.mkgmap.org.uk<br>> > > Subject: Re: [mkgmap-dev] Problem with turn restriction<br>> > ><br>> > > Hi Gerd,<br>> > ><br>> > > I get an exception when running the branch:<br>> > ><br>> > > java.lang.NullPointerException<br>> > > at<br>> > ><br>> > uk.me.parabola.mkgmap.general.RoadNetwork.addRestriction(RoadNetwork.java:275)<br>> > > at<br>> > ><br>> > uk.me.parabola.mkgmap.general.MapDetails.addRestriction(MapDetails.java:130)<br>> > > at<br>> > ><br>> > uk.me.parabola.mkgmap.osmstyle.StyledConverter.createRouteRestrictionsFromPOI(StyledConverter.java:855)<br>> > > at<br>> > ><br>> > uk.me.parabola.mkgmap.osmstyle.StyledConverter.end(StyledConverter.java:587)<br>> > > at<br>> > ><br>> > uk.me.parabola.mkgmap.reader.osm.ElementSaver.convert(ElementSaver.java:239)<br>> > > at<br>> > ><br>> > uk.me.parabola.mkgmap.reader.osm.bin.OsmBinMapDataSource.load(OsmBinMapDataSource.java:67)<br>> > > at<br>> > ><br>> > uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.load(OsmMapDataSource.java:127)<br>> > > at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:167)<br>> > > at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:63)<br>> > > at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:220)<br>> > > at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:1)<br>> > > at java.util.concurrent.FutureTask.run(Unknown Source)<br>> > > at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)<br>> > > at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)<br>> > > at java.lang.Thread.run(Unknown Source)<br>> > ><br>> > > I'll try again with assertions enabled to find the restriction which<br>> > > causes the problem.<br>> > ><br>> > > WanMil<br>> > ><br>> > > > no problem.<br>> > > ><br>> > > > I also think your patch is also complaining about invalid restrictions<br>> > > > with the wrong messages.<br>> > > > Attached my proposal.<br>> > > ><br>> > > > Gerd<br>> > > ><br>> > > > > Date: Tue, 4 Feb 2014 21:44:33 +0100<br>> > > > > From: wmgcnfg@web.de<br>> > > > > To: mkgmap-dev@lists.mkgmap.org.uk<br>> > > > > Subject: Re: [mkgmap-dev] Problem with turn restriction<br>> > > > ><br>> > > > > Arghhh....<br>> > > > > I started mkgmap from the wrong workspace. I should have been more<br>> > > > > alarmed that I got exactly the same number of problems!<br>> > > > ><br>> > > > > Ok, I will try again and hopefully the number of problems will be<br>> > > > > reduced *very* much.<br>> > > > ><br>> > > > > Sorry!!<br>> > > > > WanMil<br>> > > > ><br>> > > > > > Hi WanMil,<br>> > > > > ><br>> > > > > > with your patch I see more messages for my Niedersachsen data,<br>> > > > > > but not a single one starts with "Late invalid".<br>> > > > > ><br>> > > > > > Maybe you are looking at an old result file?<br>> > > > > ><br>> > > > > > Gerd<br>> > > > > ><br>> > > > > > > Date: Tue, 4 Feb 2014 21:21:31 +0100<br>> > > > > > > From: wmgcnfg@web.de<br>> > > > > > > To: mkgmap-dev@lists.mkgmap.org.uk<br>> > > > > > > Subject: Re: [mkgmap-dev] Problem with turn restriction<br>> > > > > > ><br>> > > > > > > Hi Gerd,<br>> > > > > > ><br>> > > > > > > your fixes for 3) were already sorted out by my checks. So<br>> > relations<br>> > > > > > > without via coord in the bbox were not counted.<br>> > > > > > ><br>> > > > > > > I wonder why your fixes for 1) do not help. I have expected<br>> > that it<br>> > > > > > > removes some of the 851 problems...<br>> > > > > > ><br>> > > > > > > By the way:<br>> > > > > > > 2) mmh, I don't mind adding that but I think it can be<br>> > addressed with<br>> > > > > > > very low priority. If there is a street where u-turns are not<br>> > allowed<br>> > > > > > > the street should be mapped with separate ways for each direction<br>> > > > > > > (that's my opinion - don't know if that matches with the official<br>> > > > > > > mapping guidelines).<br>> > > > > > ><br>> > > > > > > 4) Ok, they can be ignored. Would be great if we can detect<br>> > them to<br>> > > > > > > output different log messages for them.<br>> > > > > > ><br>> > > > > > > WanMil<br>> > > > > > ><br>> > > > > > > > Hi WanMil,<br>> > > > > > > ><br>> > > > > > > > that's strange. With r3000 I saw many problems for<br>> > > > Niedersachen, with<br>> > > > > > > > r3002 only 4, and those were the two examples.<br>> > > > > > > ><br>> > > > > > > > I am downloading latest Germany now.<br>> > > > > > > ><br>> > > > > > > > Gerd<br>> > > > > > > ><br>> > > > > > > ><br>> > > > > > > ><br>> > > > > > > > WanMil wrote<br>> > > > > > > >> Hi Gerd,<br>> > > > > > > >><br>> > > > > > > >> I think your changes are good.<br>> > > > > > > >> Anyhow for my special purpose I don't see any difference after<br>> > > > > > your fixes.<br>> > > > > > > >> So I will explain what and how I am checking the<br>> > restrictions (see<br>> > > > > > > >> attached patch with the check code).<br>> > > > > > > >><br>> > > > > > > >> All restrictions that are valid after loading but which<br>> > cannot be<br>> > > > > > > >> written to the map because there is a problem when the<br>> > > > > > > >> RestrictionRelation.addRestriction(..) is called are logged<br>> > > > with the<br>> > > > > > > >> (not very useful...) text "Late invalid: "+URL of restriction.<br>> > > > > > > >><br>> > > > > > > >> See relation_problems.txt with the results. There are 851<br>> > > > problems in<br>> > > > > > > >> Germany using the tiles created with attached areas.list.<br>> > > > > > > >><br>> > > > > > > >> I am not sure if really all logged restrictions are completely<br>> > > > > > valid but<br>> > > > > > > >> all I checked should make its way into the mkgmap compiled<br>> > map.<br>> > > > > > > >><br>> > > > > > > >> I hope this helps you to find some other problematic places!<br>> > > > > > > >><br>> > > > > > > >> WanMil<br>> > > > > > > >><br>> > > > > > > >>> Hi WanMil,<br>> > > > > > > >>><br>> > > > > > > >>> up to now I found these reasons for problems:<br>> > > > > > > >>> 1) one error in the branch: via coords were replaced without<br>> > > > updating<br>> > > > > > > >>> the corrresponding restrictions and the hash map<br>> > > > > > > >>> 2) "no_u_turn" restrictions were not added<br>> > > > > > > >>> if from-way and to-way are equal. They are evaluated to be<br>> > > > valid, but<br>> > > > > > > >>> I don't know if they really make sense?<br>> > > > > > > >>> 3) restrictions are added to the restrictions hash map<br>> > even if<br>> > > > > > the via<br>> > > > > > > >>> coord is<br>> > > > > > > >>> not contained in the bounding box.<br>> > > > > > > >>><br>> > > > > > > >>> 4) restrictions that have a from-way or to-way which<br>> > > > > > > >>> is not added with a routable type or not at all,<br>> > > > > > > >>> e.g. way http://www.openstreetmap.org/way/225540783<br>> > > > > > > >>> has no tags but is part of three restriction relations.<br>> > > > > > > >>> Another example:<br>> > > > > > > >>> http://www.openstreetmap.org/relation/2880411<br>> > > > > > > >>> refers to ways that are tagged lane=tertiary<br>> > > > > > > >>> and the default style ignores them.<br>> > > > > > > >>><br>> > > > > > > >>> In high-prec-coords branch r3003 I've fixed 1) to 3), please<br>> > > > > > > >>> check again.<br>> > > > > > > >>><br>> > > > > > > >>> Gerd<br>> > > > > > > >>><br>> > > > > > > >>><br>> > > > > > > >>><br>> > > > > > > >>> > Date: Mon, 3 Feb 2014 13:01:40 -0800<br>> > > > > > > >>> > From:<br>> > > > > > > ><br>> > > > > > > >> gpetermann_muenchen@<br>> > > > > > > ><br>> > > > > > > >>> > To:<br>> > > > > > > ><br>> > > > > > > >> mkgmap-dev@.org<br>> > > > > > > ><br>> > > > > > > >>> > Subject: Re: [mkgmap-dev] Problem with turn restriction<br>> > > > > > > >>> ><br>> > > > > > > >>> > WanMil wrote<br>> > > > > > > >>> > >> I want to make a small statistic why restriction<br>> > relations<br>> > > > > > become<br>> > > > > > > >>> > >> invalid. Maybe the problem is so seldom that it's not<br>> > > > worthy...<br>> > > > > > > >>> > ><br>> > > > > > > >>> > > I have made a short stat with the high-prec branch:<br>> > > > > > > >>> > > There are around 850 relations that are valid<br>> > > > > > > >>> > > (RestrictionRelation.isValid() == true) after loading but<br>> > > > > > that are<br>> > > > > > > >>> not<br>> > > > > > > >>> > > valid when the StyledConverter calls<br>> > > > > > > >>> > > RestrictionRelations.convertRelation(MapCollector ...).<br>> > > > > > > >>> > > So it seems to me as if the problem is greater than<br>> > expected.<br>> > > > > > > >>> ><br>> > > > > > > >>> > Yes, sounds too much. The only good case that I can<br>> > think of<br>> > > > > > > >>> > is that the relation is saved by splitter because one<br>> > of the<br>> > > > > > > >>> > related ways has at least one point within the<br>> > boundary, but<br>> > > > > > > >>> > another part of the relation is outside of the boundary.<br>> > > > > > > >>> > If the via node is within the tile boundary we should<br>> > be able<br>> > > > > > > >>> > to create the restriction.<br>> > > > > > > >>> ><br>> > > > > > > >>> > Gerd<br>> > > > > > > >>> ><br>> > > > > > > >>> ><br>> > > > > > > >>> ><br>> > > > > > > >>> > --<br>> > > > > > > >>> > View this message in context:<br>> > > > > > > >>><br>> > > > > ><br>> > > ><br>> > http://gis.19327.n5.nabble.com/Problem-with-turn-restriction-tp5795049p5795167.html<br>> > > > > > > >>> > Sent from the Mkgmap Development mailing list archive at<br>> > > > > > Nabble.com.<br>> > > > > > > >>> > _______________________________________________<br>> > > > > > > >>> > mkgmap-dev mailing list<br>> > > > > > > >>> ><br>> > > > > > > ><br>> > > > > > > >> mkgmap-dev@.org<br>> > > > > > > ><br>> > > > > > > >>> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br>> > > > > > > >>><br>> > > > > > > >>><br>> > > > > > > >>> _______________________________________________<br>> > > > > > > >>> mkgmap-dev mailing list<br>> > > > > > > >>><br>> > > > > > > ><br>> > > > > > > >> mkgmap-dev@.org<br>> > > > > > > ><br>> > > > > > > >>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br>> > > > > > > >>><br>> > > > > > > >><br>> > > > > > > >><br>> > > > > > > >> _______________________________________________<br>> > > > > > > >> mkgmap-dev mailing list<br>> > > > > > > ><br>> > > > > > > >> mkgmap-dev@.org<br>> > > > > > > ><br>> > > > > > > >> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br>> > > > > > > >><br>> > > > > > > >> relation_check.patch (1K)<br>> > > > > > > >><br>> > > > > ><br>> > > ><br>> > &lt;http://gis.19327.n5.nabble.com/attachment/5795291/0/relation_check.patch&gt;<br>> > > > > > > >> areas.list (14K)<br>> > > > > > > >><br>> > > > &lt;http://gis.19327.n5.nabble.com/attachment/5795291/1/areas.list&gt;<br>> > > > > > > >> relation_problems.txt (71K)<br>> > > > > > > >><br>> > > > > ><br>> > > ><br>> > &lt;http://gis.19327.n5.nabble.com/attachment/5795291/2/relation_problems.txt&gt;<br>> > > > > > > ><br>> > > > > > > ><br>> > > > > > > ><br>> > > > > > > ><br>> > > > > > > ><br>> > > > > > > > --<br>> > > > > > > > View this message in context:<br>> > > > > ><br>> > > ><br>> > http://gis.19327.n5.nabble.com/Problem-with-turn-restriction-tp5795049p5795294.html<br>> > > > > > > > Sent from the Mkgmap Development mailing list archive at<br>> > > > Nabble.com.<br>> > > > > > > > _______________________________________________<br>> > > > > > > > mkgmap-dev mailing list<br>> > > > > > > > mkgmap-dev@lists.mkgmap.org.uk<br>> > > > > > > > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br>> > > > > > > ><br>> > > > > > ><br>> > > > > > > _______________________________________________<br>> > > > > > > mkgmap-dev mailing list<br>> > > > > > > mkgmap-dev@lists.mkgmap.org.uk<br>> > > > > > > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br>> > > > > ><br>> > > > > ><br>> > > > > > _______________________________________________<br>> > > > > > mkgmap-dev mailing list<br>> > > > > > mkgmap-dev@lists.mkgmap.org.uk<br>> > > > > > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br>> > > > > ><br>> > > > ><br>> > > > > _______________________________________________<br>> > > > > mkgmap-dev mailing list<br>> > > > > mkgmap-dev@lists.mkgmap.org.uk<br>> > > > > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br>> > > ><br>> > > ><br>> > > > _______________________________________________<br>> > > > mkgmap-dev mailing list<br>> > > > mkgmap-dev@lists.mkgmap.org.uk<br>> > > > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br>> > > ><br>> > ><br>> > > _______________________________________________<br>> > > mkgmap-dev mailing list<br>> > > mkgmap-dev@lists.mkgmap.org.uk<br>> > > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br>> ><br>> ><br>> > _______________________________________________<br>> > mkgmap-dev mailing list<br>> > mkgmap-dev@lists.mkgmap.org.uk<br>> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br>> ><br>> <br>> _______________________________________________<br>> mkgmap-dev mailing list<br>> mkgmap-dev@lists.mkgmap.org.uk<br>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br></div>                                            </div></body>
</html>