Skip to content
Snippets Groups Projects
Commit 3c6e39cc authored by Alexandre Pradeilles's avatar Alexandre Pradeilles
Browse files

samedi

parent 5f28623e
No related branches found
No related tags found
No related merge requests found
import geocoder
import requests
def geocode(city):
g = geocoder.osm(city)
return (g.y,g.x)
# Driver function
if __name__=="__main__":
# coordinates =[49.15,2.325]
# intersection : 48.711889 2.161818
#g = geocoder.osm([48.89, 2.247], method='reverse')
params = {
'lat':48.711889,
'lon':2.161814,
'format':'json',
'polygon_geojson' : 1
}
req = requests.get("https://nominatim.openstreetmap.org/reverse",params)
reqJson = req.json()
print(reqJson)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment