Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 850913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:20:36+00:00 2026-05-15T07:20:36+00:00

How do I determine if a point is inside or outside a polygon that

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T07:20:37+00:00Added an answer on May 15, 2026 at 7:20 am

    In fact the normal ray tracing and winding rule approaches work just fine on the surface of a sphere, with a little adjustment.

    On the surface of a sphere a ‘straight line’ is a great circle and distances are measured in angular units rather than metres or inches. To draw a ray from an arbitrary point on the surface of the sphere simply form a great circle through that arbitrary point and any other point on the surface of the sphere. To keep the maths clean choose a second point about pi/2 away from the point whose location you are testing. Apply the usual even-odd rule to the great circle and your test polygon.

    The winding rule also translates directly from straight lines in the plane to (segments of) great circles on a sphere.

    All you need now are Java implementations of basic spherical geometry operations. I don’t have any recommendations on that front, but I guess the Internet will help. For the maths start with Mathworld.

    Another approach would be to project your points and polygons from the surface of the sphere to the plane — which is what map projections do — the topological relationship of insideness will not be affected by such a transformation.

    Oh, and you’ll have to decide what to do if your polygon describes a great circle

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to determine if a specific point lies inside a polyhedron. In my
I'm trying to determine if a point is inside a polygon. the Polygon is
I wish to determine if a Point P(x,y,z) is inside a 2D circle in
What is the simplest algorithm to determine if a point is inside a 2d
How do you determine if a point is inside a closed SVG path with
how to determine if a POINT is inside the area of a button? the
how can i determine which application is the owner of which folder inside the
I am trying to determine the distance from a point to a polygon in
I wish to determine the intersection point between a ray and a box. The
I need to determine the quadrant of point, in a faster way. I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.