Closed lucianopaz closed 4 years ago
osmnx has a couple functions to parse an Overpass API response
Thanks @kylebarron, but it looks like osmnx returns a regular json response from requests to overpass.
Hi @lucianopaz, unfortunately I believe this is out of scope for this package. The purpose of this geojson
package is to adhere to the GeoJSON spec. Nothing in the spec describes conversion to the spec from arbitrary other formats. Ideally you should let your request be known to the OSM team; I would like to see them build GeoJSON export directly into the Overpass API. Alternately perhaps you could convince https://github.com/brandonxiang/geojson-python-utils to add it to their package. Building a standalone osm-geojson
package from scratch is another option to consider. Lastly, do a thorough search of the web to see if someone hasn't already shared a script to do this conversion, if you haven't already. Good luck!
Did a bit of searching for you. It looks like https://github.com/tyrasd/overpass-turbo supports GeoJSON export. @lucianopaz can you let us know if that works for you?
Thanks @rayrrr. Yeah, I felt that this was a bit out of scope of your project. I'll close the issue.
Yes, I'd seen overpass-turbo, and also found osmtogeojson and query-overpass. I had to work on other stuff first, so I still haven't decided on whether to use these nodejs packages and then collect their geojson output into python. I would prefer to have a pure python solution, because I'll be using the query results in a analysis pipeline that is in python, and nodejs packages felt as unnecessary clobber. Thanks again for your help
First of all, thanks for this great project!
I'm trying to query data from open street maps using their overpass API. It's easy to get results as a json using their overpass-ql language, but I would really love to convert those into valid geojson.
For example:
This prints out:
If this is out of your project's scope, feel free to close this issue.