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?
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.
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?
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
As height defines the height to the top of the roof according to wiki, I think the current value of the example is acceptable.
Ok, but what is writtent there, is that actually true?
My intention is to figure out how communitiy sees this topic now
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?
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?
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.
Read it related to the example on the wiki page given:
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.
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.
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.
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.