Does anyone know how to get latitude and longitude of an intersection of 2 roads given 2 roads address by and Map API like Google map API?
I currently find a solution for Python such as from geopy
.
Thank you!
Does anyone know how to get latitude and longitude of an intersection of 2 roads given 2 roads address by and Map API like Google map API?
I currently find a solution for Python such as from geopy
.
Thank you!
def loc(streetA, streetB):
res = requests.get('https://www.google.com/maps/place/'+streetA+' & '+streetB)
return re.findall(r'll=(.*?)" item', res.text)[0].split(',')
gps = loc('19th rd nw', 'kafir rd')
print(gps)
>>['38.302811', '-95.767682']
Its not an api but you can always just scrape google maps? Here is a function I threw together that takes two strings representing the roads that intersect.