Check if geo-point is inside or outside of polygon

前端 未结 3 1117
刺人心
刺人心 2020-12-23 17:19

I am using python and I have defined the latitudes and longitudes (in degrees) of a polygon on the map. My goal is to check if a generic point P of coordinates

3条回答
  •  独厮守ぢ
    2020-12-23 17:36

    Another way to do it is by using the even-odd algorithm explained in this link https://wrf.ecse.rpi.edu//Research/Short_Notes/pnpoly.html The python code is given in wikipedia https://en.wikipedia.org/wiki/Even–odd_rule

    Folks, just remember that the ORDER OF POINTS that make the polygon MATTER! I mean, different order results in different polygons.

提交回复
热议问题