OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

Announcement

A fix has been applied to the login system for the forums - if you have trouble logging in please contact support@openstreetmap.org with both your forum username and your OpenStreetMap username so we can make sure your accounts are properly linked.

#1 2017-12-24 17:40:59

Zkir
Member
From: Хрустальная Москва
Registered: 2009-02-21
Posts: 6,079

Q: how to extract building parts?

Hi Guys,

How to extract building parts?

I have extracted buildings (churches) from the planet.osm file using osmosis, it's quite easy even with relations (something like --tf accept-relations building=church --used-way  --used-node will do), but those are merely multipolygons, e.g. https://www.openstreetmap.org/relation/6637079 is just building outline, no any relation with parts.

So my question is how to fetch building parts of the certain building? is there any standard way to do that?

Last edited by Zkir (2017-12-24 20:21:39)


De Constantia Sapientis --  De Vita Beata -- Apocolocyntosis divi Claudii

Offline

#2 2017-12-24 18:18:14

vvoovv
Moderator
Registered: 2008-03-04
Posts: 2,172

Re: Q: how to extract building parts?

Zkir,

You need to find in which outline a building part is located.

BTW, Haven't heard from you for a while

Offline

#3 2017-12-24 22:41:37

Zkir
Member
From: Хрустальная Москва
Registered: 2009-02-21
Posts: 6,079

Re: Q: how to extract building parts?

vvoovv, thank you!


Since I still have a little more post on this forum than you, I guess not so much time has passed.
I hope you are doing well too, nice to see you again)


You need to find in which outline a building part is located.

OK, i see.  Is there any standard tool for that? Or I need to code it myself? smile
this should be actually very precise check...

Last edited by Zkir (2018-01-10 12:00:10)


De Constantia Sapientis --  De Vita Beata -- Apocolocyntosis divi Claudii

Offline

#4 2017-12-24 23:46:29

vvoovv
Moderator
Registered: 2008-03-04
Posts: 2,172

Re: Q: how to extract building parts?

I've been checking if an outline and a building part share some common nodes. If there are no common nodes I've been using a BVH-tree to find which outline a ray originating from a node of the building part hits.

Offline

#5 2018-01-10 11:59:30

Zkir
Member
From: Хрустальная Москва
Registered: 2009-02-21
Posts: 6,079

Re: Q: how to extract building parts?

I've been checking if an outline and a building part share some common nodes. If there are no common nodes I've been using a BVH-tree

Ok, it seems reasonable.

But there are building parts that are outside outlines!
for example this one:  http://www.openstreetmap.org/way/447556578

Is it considered to be acceptable  or not?  I guess the author of this way tried to render cornice (https://en.wikipedia.org/wiki/Cornice), but from my point of view it is completly illogical, because outline is actually a projection of all parts  a building to the ground.


***

And also a question, which I tried to raise 5 years ago:  how to tag actuall building heights?
In other words, what should be height value on buildning outline: total height or heigh of the lowest building part?

Outline of this bilding (https://www.openstreetmap.org/way/36866037#map=19/56.31051/38.12957, it'a a bell tower) should be actually 86, but currently it is set to 19, to get currect rendering of  the lowest part.


Can I change it to 86?  (height=86), or should I use (or invent) some other tagging scheme, e.g.  building:total_height=86?

My first task is to obtain the list of the highest buildings in Russia.

Last edited by Zkir (2018-01-10 13:46:16)


De Constantia Sapientis --  De Vita Beata -- Apocolocyntosis divi Claudii

Offline

#6 2018-01-10 13:39:29

R0bst3r
Member
Registered: 2015-04-23
Posts: 389

Re: Q: how to extract building parts?

An outline can be defined by the building=* tag or if building parts are outside of the building with an building:part=yes.
So the given example is a possible tagging scheme.

See https://demo.f4map.com/#lat=56.3106177& … 48&zoom=19

All your questions are answered on this wiki page: https://wiki.openstreetmap.org/wiki/Simple_3D_buildings
If there are multiple height in an outline use inner building parts or maybe levels. If you don't want to, you're free to choose, I would then prefer the average height wink

As height defines the height to the top of the roof according to wiki, I think the current value of the example is acceptable.


Manchmal muss man einfach mal machen ...

Offline

#7 2018-01-10 16:47:34

Zkir
Member
From: Хрустальная Москва
Registered: 2009-02-21
Posts: 6,079

Re: Q: how to extract building parts?

R0bst3r wrote:

All your questions are answered on this wiki page: https://wiki.openstreetmap.org/wiki/Simple_3D_buildings

Ok, but  what is writtent there, is that actually true?
My intention is to figure out how communitiy sees this topic now smile

e.g., it is stated:
When a building has any building:part=* areas, the building outline is not considered for 3D rendering.
Is it really so?

If there are multiple height in an outline use inner building parts or maybe levels. If you don't want to, you're free to choose, I would then prefer the average height wink

OK, great. I will change the height of this bell tower to 86. Let's see how F4, osm2world and Kendzi3d will react to that.
This way has full height once: https://www.openstreetmap.org/way/36866037/history, version 6, and then was changed to height of the first "tier" --version 7.


And you have not answered my question, what is  a proper way to obtain the list of the tallest buildings from OSM data. Do I need to analyze building parts for that?

Last edited by Zkir (2018-01-10 17:16:19)


De Constantia Sapientis --  De Vita Beata -- Apocolocyntosis divi Claudii

Offline

#8 2018-01-10 18:17:32

R0bst3r
Member
Registered: 2015-04-23
Posts: 389

Re: Q: how to extract building parts?

Zkir wrote:

When a building has any building:part=* areas, the building outline is not considered for 3D rendering.
Is it really so?

Yes, if you use building:part it has to cover the whole building outline, outline is ignored for 3D but still relevant for 2D rendering.

Zkir wrote:

And you have not answered my question, what is  a proper way to obtain the list of the tallest buildings from OSM data. Do I need to analyze building parts for that?

Yes, you have.


Manchmal muss man einfach mal machen ...

Offline

#9 2018-01-10 20:27:14

Zkir
Member
From: Хрустальная Москва
Registered: 2009-02-21
Posts: 6,079

Re: Q: how to extract building parts?

R0bst3r, thank you for your answers.

outline is ignored for 3D

I do not see that it is ignored, and do not understand, how it could be.


Consider the following example:
https://www.openstreetmap.org/way/35546654

in F4: http://demo.f4map.com/#lat=56.3087989&l … hi=-27.215

the building structure is the following: cillinder, then dome, then another cillinder, and then pyramidal roof. There is no building part for the lowest tier other than way/35546654, which is also outline. F4, osm2world and kendzi3d does consider it for 3d.

Last edited by Zkir (2018-01-10 20:37:09)


De Constantia Sapientis --  De Vita Beata -- Apocolocyntosis divi Claudii

Offline

#10 2018-01-10 21:49:17

R0bst3r
Member
Registered: 2015-04-23
Posts: 389

Re: Q: how to extract building parts?

Zkir wrote:

outline is ignored for 3D

I do not see that it is ignored, and do not understand, how it could be.

Read it related to the example on the wiki page given:

wiki wrote:

The entire building outline is filled with building:part=* ways ...
When a building has any building:part=* areas, the building outline is not considered for 3D rendering. ...

You have a building outline. Fill it completely with building:parts. No 3D building properties on outline, all on building:parts, otherwise the outline will 'cover' the building:part. If it's getting complex, add a building relation, it's also a good idea to use this as documentation of your building:parts.

BUT: You are free to use tags on building outline. You are free to use only single building:parts and do no cover the whole outline. Your are also free to don't use a relation. And the 3D renderers will anyway try to interpret your tags. You can also resign height tags and your building will still get a default height.

OSM is not perfect nor your tagging has to be. The result is the important thing and that's the task of the 3D renderers.

Last edited by R0bst3r (2018-01-10 21:50:05)


Manchmal muss man einfach mal machen ...

Offline

#11 2018-01-11 17:47:28

Tordanik
Moderator
From: Germany
Registered: 2008-06-17
Posts: 2,189
Website

Re: Q: how to extract building parts?

I'm afraid some of R0bst3r's statements contradict the documentation. Unlike some parts of OSM that suffer from poorly-defined tags, Simple 3D Buildings is actually quite clear about these things. So in particular:

  • All building:part areas must be entirely inside a building area. The cornice example you linked to is incorrect.

  • The building outline must be entirely covered with building parts. What happens if this rule is not followed varies widely between renderers, and cannot be relied on.

  • You do not need to analyze building parts to find the highest buildings. The height on the building=* area must be the height of the entire building.

Note that the last item means that you ought to never use the same element (e.g. a way) to represent both the building as a whole and one of its parts. The height would inevitably be incorrect for either one or the other.

Offline

#12 2018-01-11 20:22:36

vvoovv
Moderator
Registered: 2008-03-04
Posts: 2,172

Re: Q: how to extract building parts?

Tordanik wrote:

All building:part areas must be entirely inside a building area.

A minor correction:
All building:part areas must be entirely inside a building area, if a relation type=building isn't present for the building.

If the relation type=building is present, all building parts must be listed as the relation members with the role=part. The building outline must be listed with the role=outline. The building parts can be located in any possible way relative to the building outline in the presence of the relation type=building.

It makes sense to use the relation type=building only for buildings with parts hanging over the building outline.

Offline

#13 2018-01-11 20:44:33

vvoovv
Moderator
Registered: 2008-03-04
Posts: 2,172

Re: Q: how to extract building parts?

I added clarifications for the type=building relation in the Simple 3D Buildings specification:
https://wiki.openstreetmap.org/wiki/Sim … _relations

Offline

#14 2018-01-11 21:34:16

Tordanik
Moderator
From: Germany
Registered: 2008-06-17
Posts: 2,189
Website

Re: Q: how to extract building parts?

vvoovv wrote:

All building:part areas must be entirely inside a building area, if a relation type=building isn't present for the building.

I'm not sure I agree with that change. The building outline section states: "The building outline represents the area of land covered by the union of all parts of the building." A statement like that (with slightly different phrasing) has been part of the page since its first version, and there's zero indication that this would only apply to relation-free buildings.

Offline

#15 2018-01-12 09:04:24

Zkir
Member
From: Хрустальная Москва
Registered: 2009-02-21
Posts: 6,079

Re: Q: how to extract building parts?

Tordanik, thank you, that makes perfect sense for me.

Tordanik wrote:

you ought to never use the same element (e.g. a way) to represent both the building as a whole and one of its parts.

I do not have statistics, but it seems that it's quite common practice for towers with several tiers. But Ok, original intention is clear.

By the way, is osm2world still in development? Do you accept feature requests/bug reports?


De Constantia Sapientis --  De Vita Beata -- Apocolocyntosis divi Claudii

Offline

#16 2018-01-12 16:19:51

Tordanik
Moderator
From: Germany
Registered: 2008-06-17
Posts: 2,189
Website

Re: Q: how to extract building parts?

Zkir wrote:

By the way, is osm2world still in development? Do you accept feature requests/bug reports?

Sure! smile The best place for bug reports and feature requests is on Github, but you can also contact me directly if you prefer.

Offline

Board footer

Powered by FluxBB