
Hi Ticker the problem is in mkgmap. I can reproduce it with the attached simple example. I think the bug is in the distance calculation in isPointInShape(), see attached patch. It returned ON for a point which is clearly inside. I've also changed the way how test points are calculated so that the rounding tolerances are less likely to produce a problem. I don't understand the meaning of the comment // there is a small area between the square EPS_HP*2 and the circle within, where, if polygon vertex and // segments are the other side, it might still be calculated as ON. so maybe my patch makes things worse in other situations? My understanding is that we can use a² + b² = c² , so maybe the comment can be removed as well? Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Joris Bo <jorisbo@hotmail.com> Gesendet: Dienstag, 19. Mai 2020 21:12 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Explanation of the is_in function Hi Ticker, Thx for the update, off course no problem. Gr Joris -----Oorspronkelijk bericht----- Van: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> Namens Ticker Berkin Verzonden: dinsdag 19 mei 2020 18:57 Aan: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> Onderwerp: Re: [mkgmap-dev] Explanation of the is_in function Hi Joris I can't do anything in the next few days to investigate this but I'll have a look when I can. Ticker _______________________________________________ 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