2

I have a mysql table consisting of polygon coordinates. In a different table I have co-ordinate of marker. I need to find nearest point from marker to polygon

I am trying to convert some algorithms but not getting any where

Find indices of polygon vertices nearest to a point

Also tried to convert javascript options

https://gis.stackexchange.com/questions/309515/find-closest-point-using-l-geometryutil-closest-and-open-its-popup

Find a point in a polyline which is closest to a latlng

But I am not getting any idea how can I achieve it in server side PHP or 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

0 Answers0