1

I'm trying to draw a map using OSM raw data.Some of buildings have holes inside (may even more than one hole at a time) .

In way list, all I can see is set of "way nodes". Where should I get the information in OSM.xml that a Node represent a hole is belong to a specific building?

Note: In Relation there is innerWay - outerWay relation for some buildings but it does not cover all the cases as I see. How openstreetmap draw building?

I achieved drawing it in Opengl using tesselation without knowing which hole belong which building but, I couldn't apply same approach on unity. Here is a screenshot from opengl :enter image description here

  • What software are you using? – dof1985 Apr 13 '15 at 15:56
  • I handled this using OpenGL using tesselation before but I had to move my code to Unity3D and now I need which ways inside which building to apply my algorithm – Berke Cagkan Toptas Apr 13 '15 at 15:57
  • It would be best if you provide such details, i.e. the programs you are using, in your question. That can be done using the edit button – dof1985 Apr 13 '15 at 15:58
1

"Note: In Relation there is innerWay - outerWay relation for some buildings but it does not cover all the cases as I see. How openstreetmap draw building?"

The reason you are not seeing "all the cases" as you mentioned, is because the default OpenStreetMap Carto rendering actually kind of "hides" data errors: it simply stacks polygons in size-based order from large on the bottom, to small on top. This means that some of the apperent "inner-courts" or holes of buildings you see, aren't actual proper multipolygons with inner and outer roles defined for constituting ways, but simply a smaller polygon with a different landuse or so, stacked on top of a non-multipolygon building outline.

This means that if you do proper processing of the data and multipolygons (which you should IMO), and ignore this "visual" fix, then you will not get the same "pretty", but in essence false, picture that the default rendering presents to you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.