This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Query building footprint coordinates with python?

1

I'm trying to get the geometry of a building by giving a coordinate. Input (lat,lng) output (coordinates of the building that it intersects).

I want to be able to do this with python from a script within QGIS.

I've tried a library called osmnx and managed to get it to work, however the dependencies are horrible. Took me a few pip installs and pip uninstalls to get it working correctly.

I need this script to run on a few different computers and I can see that being a huge issue. This also needs to be in QGIS, so I want to avoid the osmnx module.

Is there a way I can do with with maybe a built in module in python to return the coordinates of a polygon.

asked 25 Oct '22, 23:09

KrisMapper's gravatar image

KrisMapper
26224
accept rate: 0%


One Answer:

0

I ended up using the Python requests library with building the url query from http://overpass-turbo.eu/ Works great!

answered 26 Oct '22, 21:56

KrisMapper's gravatar image

KrisMapper
26224
accept rate: 0%

Source code available on GitHub .