Answer the question
In order to leave comments, you need to log in
How to calculate the distance from your coordinates to the street what is in the answer (geopy)?
I use the code to get the address of the point:
from geopy.geocoders import Nominatim
from geopy.distance import vincenty
geolocator = Nominatim()
point1=(44.778374,10.341664)
loc = geolocator.reverse("44.778374,10.341664") #Координаты точки
point2 = (loc.raw['lat'], loc.raw['lon']) #Координаты точки ответа
print vincenty(point1, point2).meters #Получаем растояние
Answer the question
In order to leave comments, you need to log in
Let me put the question differently: how to calculate the distance to the nearest street from your coordinates?
Using the module "geopy" I get the name of the street (nearest), as well as the coordinates of the middle of this street
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question