Geospatial Functions
AMPS includes a function for calculating the distance from a signed latitude and longitude.
GEO_DISTANCE
GEO_DISTANCE
GEO_DISTANCE(first_latitude, first_longitude, second_latitude, second_longitude)
Returns a double that contains the distance between the point identified by first_latitude, first_longitude and second_latitude, second_longitude in meters. AMPS uses the haversine formula when computing distances.
Parameters
first_latitude: The latitude of the first point.first_longitude: The longitude of the first point.second_latitude: The latitude of the second point.second_longitude: The longitude of the second point.
Returns
A double representing the distance between the two points in meters.