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

2019-03-11 Thread Carlos Cámara Menoyo via talk
Thank you everyone for your help. With Bryce's example + Martijn Library (thanks for developing it!) + some further research I am sure I will be able to achieve what I was looking for! Best, Carlos Cámara-Menoyo https://carloscamara.es ‐‐‐ Original Message ‐‐‐ On Monday 11 March de

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

2019-03-11 Thread Dave F via talk
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

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

2019-03-11 Thread Dave F via talk
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

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

2019-03-11 Thread Martijn van Exel
Carlos — I am the maintainer of that library Bryce provided the sample code for. I am happy to answer any specific questions about it. However, I’d advise you take some time to study python first. Without a basic understanding of the language you are programming in, you are unlikely to be

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

2019-03-11 Thread Mateusz Konieczny
Mar 11, 2019, 6:54 PM by talk@openstreetmap.org: > Can I add the query in more than a single line? (the provided one is quite > simple and still it is long) If so, how? (from what I am seeing Python is > very strict dealing with new lines) > This is not the best place for Python-specific

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

2019-03-11 Thread Carlos Cámara Menoyo via talk
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). I tried Bryce's code, which uses overpass api python wrapper (https://github.com/mvexel/overpass-api-python-wrapper), and it

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

2019-03-11 Thread Dave F via talk
Unsure, but would OSMtoGeojson be of use? https://github.com/tyrasd/osmtogeojson DaveF On 11/03/2019 10:18, Carlos Cámara Menoyo via talk wrote: Dear colleagues, I have just started to use Python and I would like to make a query to Overpass and store the results in a geospatial format (e.g.

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

2019-03-11 Thread Mateusz Konieczny
Mar 11, 2019, 4:04 PM by ccam...@pm.me: > Thanks for your reply, Mateusz. > > I know (and use) Overpass turbo. However, what I want to do is to store a > query and execute it in order to update results and store them as a file for > further manipulation > OK, in that case you probably don;t

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

2019-03-11 Thread Bryce Jasmer
I use the overpass library (I think it's the one you mentioned). The resulting dictionary can be coerced to a string and written out and it should be valid geojson. #!/usr/bin/python3 import overpass api = overpass.API() result =

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

2019-03-11 Thread Carlos Cámara Menoyo via talk
Thanks for your reply, Mateusz. I know (and use) Overpass turbo. However, what I want to do is to store a query and execute it in order to update results and store them as a file for further manipulation, so I can easily update results without the need to accessing to the interface, generate

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

2019-03-11 Thread Mateusz Konieczny
Mar 11, 2019, 11:18 AM by talk@openstreetmap.org: > Dear colleagues, > > I have just started to use Python and I would like to make a query to > Overpass and store the results in a geospatial format (e.g. GeoJSON) so I can > programatically update the data. > > As far as I know, there is a

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

2019-03-11 Thread Carlos Cámara Menoyo via talk
Dear colleagues, I have just started to use Python and I would like to make a query to Overpass and store the results in a geospatial format (e.g. GeoJSON) so I can programatically update the data. As far as I know, there is a library called overpy that should be what I am looking for. After