How do I get Building shape coordinates as raw data?

Hi OSM community!
I’m an urban design student from Munich. I’m new to OSM, but I love it already!
For my urban analysis research, I want to measure building areas and building circumferences (and more) in large areas.

To do so, i would need to get a list (array) of the raw coordinates that define the buildings’ outlines, possibly as a .txt file or similar.

I started playing around with Maperitive, but i’d be fine with any other tool that works.
I tried to keep it short, so please let me know if there are any questions about my question!
Thank you a lot for everything already!!:slight_smile:

Martin

Welcome to the OSM forum, Martin!

My first suggestion would be to use the Overpass API to get a data extract containing only the buildings from a certain area. See this example query: http://overpass-turbo.eu/s/28Q
It does, however, not produce exactly what you want - you’d get xml or json files that contain all necessary data, but in a different format.

So what would be interesting to know is whether you can also work with a different representation. Do you have programming skills?

Danke Tordanik!!! You have no idea how much time & trouble you saved me, THANKS! The Overpass API is awesome.
I can go on with Processing (processing.org), it’s based on javaScript and seems to work perfectly fine with JSON.

thanks again for your fast and useful response!!!
Martin

Is there any way to get it to export the bounding box’s coordinates as well? Otherwise it’s impossible to render them precisely in Processing…
Thanks!
Martin

Well … originally I expected to answer with a clear “yes”. The idea is that you can use the “global bbox” feature to define a bounding box for the entire query, and then that bbox is included with the result. It works perfectly well with XML output, as you can see here: http://overpass-turbo.eu/s/2cm

But then I noticed that the same thing doesn’t seem to work with JSON output, and I’m not sure why. In my opinion that doesn’t really make sense, but the bounding box coordinates are missing: http://overpass-turbo.eu/s/2cn

I’m not sure what to make of it. Perhaps a bug report / feature request is in order.

Hello Martin,

some general hints if you are not aware yet:

see http://wiki.openstreetmap.org/wiki/Research in general,

and we also have a very active sub forum in German here :slight_smile:

I’ve opened an issue at the Overpass Github repository regarding the missing bounding box coordinates when using json output a few days ago:
https://github.com/drolbr/Overpass-API/issues/74

Martin, what’s the state of your project? Did you find a solution already?