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

Dave F davefoxfac63 at btinternet.com
Mon Mar 11 20:46:32 UTC 2019


Maybe adapt this answer:

https://gis.stackexchange.com/questions/115733/converting-json-to-geojson-or-csv/115736#115736



On 11/03/2019 20:00, Dave F via talk wrote:
>
>
> 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?)
>
>
>
> _______________________________________________
> talk mailing list
> talk at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/talk




More information about the talk mailing list