earthoutreach / earth-api-utility-library

Automatically exported from code.google.com/p/earth-api-utility-library
0 stars 0 forks source link

geo.Path.containsPoint() wrong calculation, when polygon is in two hemispheres simultaneously. #41

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The function geo.Path.containsPoint() (and therefore 
geo.Polygon.containsPoint()) doesn't return correct result if Path (or Polygon) 
is placed in both Western and Eastern Hemisphere.

That's because google coords are negative in the Western Hemisphere. And the 
calculation goes wrong.
May be, there is the same situation with the Equator line, but I didn't check 
this.

So, be aware. And if you need to operate with such polygons, please review the 
calculations in function geo.Path.containsPoint()

Original issue reported on code.google.com by irishsib...@gmail.com on 27 Sep 2012 at 12:45