Hi Ticker,

the patched version still returns ON for a Coord which is not ON and thus 
doesn't work with my example.
The result doesn't depend on the position of the last point of the way as long 
as it is builds a nearly or exactly straight line with two nodes of the shape.

Your algorithm returns true for each such point, even when it is 100m away from 
any shape vertex.
See my new example where A,B and C build a straight line. Another node is very 
close to the edge but still returns  IN (OK)


Von: mkgmap-dev <mkgmap-dev-boun...@lists.mkgmap.org.uk> im Auftrag von Ticker 
Berkin <rwb-mkg...@jagit.co.uk>
Gesendet: Donnerstag, 21. Mai 2020 17:07
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Explanation of the is_in function

Hi Gerd

Here is patch that prevents possible underflow when node is very close
to an almost horizontal or vertical line and incorrect results when
exactly on this line.


Attachment: isin3.osm
Description: isin3.osm

mkgmap-dev mailing list

Reply via email to