I have the polygon data, in the form of an array of latitudes and longitudes in mysql database, ex:
an array of latitudes and longitudes in mysql database.
[["x":23.628134, "y":27.458334],
["x":23.629867, "y":27.449021],
["x":23.62324, "y":27.445416],
["x":23.622424, "y":27.457819],
["x":23.622424, "y":27.457819]]
And i have a point (Vertex) with coordinates of latitude and longitude, ex:
$location = new vertex($_GET["longitude"], $_GET["latitude"]);
Now i want to find whether this vertex (point) is 2 miles away from each corner of the polygon or not. How can i do this in php?