I need to loop through a GeoJSON file, where for each "feature", find the city where the track started:
with open('input.geojson') as f:
gj = geojson.load(f)
for track in gj['features']:
#OK
print track['geometry']['coordinates'][0]
#How to query Nominatim to find the city that lat,lon belongs to?
#Next step : edit 'name' in gj
with open('dump.geojson', 'w') as f:
dump(gj, f, indent=2)
Would someone have some code handy?
Best Answer
You can try using Geopy.