[OSM-talk] How to save Overpass query results to a GeoJSON file with Python?

Dave F davefoxfac63 at btinternet.com
Mon Mar 11 20:00:44 UTC 2019



On 11/03/2019 17:54, Carlos Cámara Menoyo wrote:
> Thank you for the clarification, Matheus and for the link, Dave (I am afraid that's not what I was looking for, as it still requires to download data on osm format).

You can run the api from a command line or script (such as python).

Paste this into your browser & look at the file it downloads:

http://overpass-api.de/api/interpreter?data=area[name="Granollers"][admin_level=8];(way["highway"](area);relation["highway"](area););out 
body;

This can be loaded from within python (urllib?)





More information about the talk mailing list