Is it possible to compare distances in the classical way (the distance between two points: d = sqrt(pow(lat2-lat1, 2) + pow(lon2-lon1, 2)) ) using the latitude and longitude returned from google apis without any conversions in meters or sth? I need this just for comparison, to find the closest point from a series of points to a control point. For instance:
Suppose we have two (lat, bosom) points: (40.2535425,22.88245345) and (40.2565795,22.8884539) and we want to find that the witch is closest (40.2335425,22.83245345). Can the above code be applied to find the distances? Or do we need to find the distance, say, in meters (using the haversin formula or something else), first for each point from the control point, and then compare the values?
I ask this question because I don’t know what exactly the values returned by google apis are, like lat, lon! I mean that they are not deg-min-sec?
Thanks...
google-maps latitude-longitude distance
Vassilis
source share