【问题标题】:Find nearest points on KML polygon查找 KML 多边形上的最近点
【发布时间】:2019-04-02 12:43:10
【问题描述】:

在图中:

  • 红色是 GEO 点(从 GEO 位置)
  • 蓝色是 KML 多边形
  • 绿色是检查最近点的半径
  • 棕色点是半径内 KML 上最近的点

如何在数学上找到这些最近的点?

【问题讨论】:

    标签: algorithm geometry kml


    【解决方案1】:
    result = an empty list of points
    
    for each edge of the KML polygon:
        if the edge is completely inside the green circle:
            append to result the point on the edge that is closest to the green circle center (see https://math.stackexchange.com/questions/2193720/find-a-point-on-a-line-segment-which-is-the-closest-to-other-point-not-on-the-li) 
        else:
            if the edge has two different intersections with the green circle:
                find the two intersection P1 and P2
                append to result the point (P1+P2)/2
            else:
                if the edge has one intersection with the green circle:
                    append to result the intersection
                endif
            endif
        endif
    endfor
    

    【讨论】:

      猜你喜欢
      • 2011-06-20
      • 1970-01-01
      • 1970-01-01
      • 2020-12-28
      • 2019-12-07
      • 2021-07-20
      • 2021-12-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多