Detecting whether a GPS coordinate falls within a polygon on a map

前端 未结 8 1320
野趣味
野趣味 2020-12-07 10:17

As stated in the title, the goal is to have a way for detecting whether a given GPS coordinate falls inside a polygon or not.

The polygon itself can be either convex

8条回答
  •  悲&欢浪女
    2020-12-07 10:37

    If you have WGS84 coordinates on the sphere, then your polygon divides the sphere into two areas - how do we know which area is 'inside' and which is 'outside' the polygon? The question is essentially meaningless!

    For example, suppose the polygon formed the line of the equator - is the Northern hemisphere 'in' or 'out'?

提交回复
热议问题