check if a point exists in given area containing 4 vertices

前端 未结 4 921
我在风中等你
我在风中等你 2021-01-01 03:22

refering to http://www.weather.gov/directives/sym/pd01008006curr.pdf, page 8, we are given an area with four vertices in geographic coordinate system(lat and long system). I

4条回答
  •  梦毁少年i
    2021-01-01 04:10

    The way to test whether or not a point is within an arbitrary polygon (any number of sides, concave allowed as well) is to choose a point that you know is OUTSIDE the polygon; if a line segment between the point you are testing and the point that is outside the polygon crosses an ODD number of the polygon segments, the point is within the polygon.

提交回复
热议问题