我有一个由多边形坐标组成的mysql表。在另一张桌子上 我有记号笔的坐标。 我需要找到从标记到多边形的最近点
我正在尝试转换一些算法,但没有找到任何地方
Find indices of polygon vertices nearest to a point
还尝试转换javascript选项
Find a point in a polyline which is closest to a latlng
但是我不知道如何在服务器端PHP或mysql中实现它
Table 1
Id Polygon
1 POLYGON((9.99954289860805 44.0511003950809,
9.99959799860805 44.0510457950809,9.99959799860805 44.0509783950809,
9.99957439860805 44.0508603950809,9.99961729860804 44.0508873950809,
9.99971659860803 44.0509201950809,9.999906998608 44.0509567950809,
10.000177898608 44.0509779950809,10.000272598608 44.0509802950809,
44.0513239950809,9.99954289860805 44.0511003950809))
Table 2
Id Marker
1 10.3333333322,45.3222222222
Output
A coordinate inside polygon or one of the coordinate of polygon