Is a point inside or outside a polygon which is on the surface of a globe

Posted by richard on Stack Overflow See other posts from Stack Overflow or by richard
Published on 2010-06-18T03:48:04Z Indexed on 2010/06/18 3:53 UTC
Read the original article Hit count: 157

Filed under:
|
|
|

How do I determine if a point is inside or outside a polygon that lies on the the surface of the earth?

The inside of the polygon can be determined via the right hand rule, ie. the inside of the polygon is on your right hand side when you walk around the polygon.

The polygon may

  1. Circle either pole
  2. Cross the 180 longitude
  3. Cover more than 50% of the globe

As the globe is a sphere the normal ray crossing algorithms do not work correctly.

© Stack Overflow or respective owner

Related posts about java

Related posts about math