Check if polygon is inside a polygon

后端 未结 5 1118
鱼传尺愫
鱼传尺愫 2020-12-01 06:35

Yesterday I was looking to check if a point was inside a polygon and found this great script: https://github.com/tparkin/Google-Maps-Point-in-Polygon

But today at wo

5条回答
  •  死守一世寂寞
    2020-12-01 07:36

    Is the polygon convex? Because, if it is, you could just run the "point in polygon" script for both "corners" of your "rectangle." If both corners are in, and the polygon has no "curves" inward, then wouldn't the whole rectangle be in?

提交回复
热议问题