My new answer :)
Use the Google Directions API .
http://maps.google.com/maps/api/directions/<json|xml>?<params> origin destination. , . , , . , . :
[...] () - /, [...]
, . JSON. ( , XML).
: URL: http://maps.google.com/maps/api/directions/json?origin=49.75332,6.50322&destination=49.71482,6.49944&mode=walking&sensor=false
. Google, .
A , () (Haversine) (python pl/sql)
python:
from math import sin, cos, radians, sqrt, atan2
def lldistance(a, b):
"""
Calculates the distance between two GPS points (decimal)
@param a: 2-tuple of point A
@param b: 2-tuple of point B
@return: distance in m
"""
r = 6367442.5
dLat = radians(a[0]-b[0])
dLon = radians(a[1]-b[1])
x = sin(dLat/2) ** 2 + \
cos(radians(a[0])) * cos(radians(b[0])) *\
sin(dLon/2) ** 2
y = 2 * asin(sqrt(x))
d = r * y
return d
Java .