geospatial - Point in polygon algorithm that handles polygons that straddle the antemeridian -


I have a database of polygon points in the form of latitude, longitude pairs, and I need to check whether a given In the latitude, the LNG point is any of the polygon inside.

It contains many algorithms, but they do not work if polygon permits Antemiridian (on the coast of New Zealand), where longitude 180 degrees east to -180 degrees West).

I see that one solution is to find out that polygon enters the antermedicine and if so, then it is divided into each polygon, then check each of them.

The second (simple) option, IMO, is to test only for that particular case, and if it If present, then apply your conversion query point and polygon, for example, if this anti-meridian is spread, then translate everything with a special linear amount, so that it is not in the mid-term period, and do your standard test. .


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -