What is the quickest way to find the shortest cartesian distance between two polygons

后端 未结 13 1538
迷失自我
迷失自我 2021-02-01 05:54

I have 1 red polygon say and 50 randomly placed blue polygons - they are situated in geographical 2D space. What is the quick

13条回答
  •  时光说笑
    2021-02-01 06:39

    You might be able to reduce the problem, and then do an intensive search on a small set.

    Process each polygon first by finding:

    • Center of polygon
    • Maximum radius of polygon (i.e., point on edge/surface/vertex of the polygon furthest from the defined center)

    Now you can collect, say, the 5-10 closest polygons to the red one (find the distance center to center, subtract the radius, sort the list and take the top 5) and then do a much more exhaustive routine.

提交回复
热议问题