Esri / arcgis-osm-editor

ArcGIS Editor for OpenStreetMap is a toolset for GIS users to access and contribute to OpenStreetMap through their Desktop or Server environment.
Apache License 2.0
397 stars 130 forks source link

Tackling OSM "Simple 3D Buildings" #72

Open mboeringa opened 9 years ago

mboeringa commented 9 years ago

@ThomasEmge

I have come to realize that there is one other issue we need to tackle: that of the OSM buildings tagged using the "Simple 3D Buildings" tagging scheme:

http://wiki.openstreetmap.org/wiki/Simple_3D_Buildings

This is a special way of tagging, which we already encountered in the Schloss Nymphenburg example, that allows a relatively simple way of defining basic 3D building shapes. More and more, such buildings are defined in some cities, especially major ones. See also the F4 Map 3D rendering example of OSM data entirely below, that clearly shows some buildings are no "ordinary" buildings as defined by a simple closed way or multipolygon.

However, reading through this tagging scheme, I have realized ESRI probably needs to deal with this in a rather specific manner, to properly make use of these buildings in the tool. I have some ideas for this that I would like to put on paper.

I also now encountered an issue regarding buildings tagged using the Simple 3D Buildings scheme and the latest dlls. Some of them have disappeared of the map, as individual building:part objects are now set to osmSupportingElement=yes. See the screenshot below showing the old rendering on the left, and the new rendering on the right. Notice the missing buildings in the red squares. I have checked this in my Berlin databases, but in the old database, these were still osmSupportingElement=no.

An obvious "fix" might be setting them to osmSupportingElement=no, but this may revert positive changes you made to accommodate the "Schloss Nymphenburg" example. In addition, I have some other ideas based on the "Simple 3D Buildings" tagging scheme that I think we need to discuss, e.g. there is the possibility of using elements with role=outline as part of the relation with type=building as relation-type as a representation for the building geometry, but I need some time to think about this.

3d_building_issue-berliner_fernsehturm

3d_building_issue-berliner_fernsehturm_f4_map

mboeringa commented 9 years ago

Thomas,

If you have time to look at the "disappearing Simple 3D Buildings" problem, you may have a look at these two buildings, and compare them with Schloss Nymphenburg. As far as I can judge this by comparing the tagging of these features with the Simple 3D Buildings tagging scheme, these two building seem examples of good tagging, closely following the tagging guideline, including the specification of closed way or multipolygon relation in the role=outline as part of the type=building.

\ St Marienkirche, Berlin Way 23853149: http://www.openstreetmap.org/way/23853149 This way is a member of the type=building relation 3097026: http://www.openstreetmap.org/relation/3097026 as a role=outline**

\ Bode-Museum, Berlin Way 4211594: http://www.openstreetmap.org/relation/4211594 This way is a member of the type=building relation 2186879: http://www.openstreetmap.org/relation/2186879 as a role=outline**

Especially the Bode-Museum seems very cleanly tagged, with all main tags describing the entire building put on the multipolygon relation as outline, and the type=building relation just used to group the elements belonging to the building, with no other tags, thus avoiding duplication. The St.Marienkirche duplicates some of the tags between its outline and building relation.

But both features only have a building=x tag on the outline, not on the building relation or on the building:part=x, which seems desired tagging to me.

That said, the tagging scheme allows (and this is logical in the sense building can have multiple functions in different parts of the building) something like this too:

building=retail on multipolygon that represents the outline building:part=retail building:part=office building:part=appartments on individual building parts that are member of the type=building relation.

Schloss Nymphenburg actually seems incompletely tagged, missing a true outline multipolygon, and simply grouping all parts as members of a type=multipolygon relation tagged with a building=yes tag, not of a type=building relation, which is missing here too.

Actually, although I have mentioned the outline multiple times now, it seems the osm2pgsql / Mapnik / openstreetmap-carto render pipeline simply looks for closed ways and multipolygon relations tagged with building=x when rendering these buildings. Of course, when properly tagged, this should suffice, as the outline should be the only feature tagged as such as part of a type=building relation.

ThomasEmge commented 9 years ago

Marco, not sure how the polygons are "disappearing". There might have been an issue with generating the geometry itself, I made some changes today. See below what the geometries should look like.

In the case of the Bode museum, only the outline will remain visible, as the relation itself would fall into a super-relation and be stored in the relations table. bode

The Marienkirche relation will be the union of all ways. marienkirche

mboeringa commented 9 years ago

Thomas, sorry, I should have been more clear: with "disappearing" I merely mean that they are set to osmSupportingElement=yes with the latest dlls you send, and are thus filtered out in the rendering process (exactly how the ESRI layer files tread them in the Definition Query). These features were osmSupportingElement=no when I rendered with the older dlls, as per the left side of the screenshot I showed, and thus showed up.

I do see these features properly in my File Geodatabase, so it is not that they aren't there, I just can't distinguish between a "supporting element" and the main feature, because all the features of these Simple 3D Buildings were set to being a "supporting element".

In the case of the Bode museum, only the outline will remain visible, as the relation itself would fall into a super-relation and be stored in the relations table.

I think this is OK, but need to see how it works out with more rendering results and type=building "super-relations" (that you ignore, and I understand). I agree that essentially, you only need to the get the multipolgyon representing the outline, which in a properly defined Simple 3D Building is also the only feature having a building=x tag. This is the case for both the St. Marienkirche and Bode Museum.

mboeringa commented 9 years ago

Thomas,

I now checked the latest dlls, and the St. Marienkirch, Bodemuseum, Berliner Fernsehturm and Roters Rathaus, all in this screenshot below, seem to be rendered fine now. Left is the old rendering, right is the new rendering. The buildings appear as you suggested and look good.

However, I noticed one other issue, the Berliner Dom (way 313670734). I am a bit in doubt about this one, as this is a classic example of a _not_ properly tagged Simple 3D Building. If you look at the screenshots, it does not appear in the new rendering using the latest dlls.

This building has a type=building super relation, but no defined outline polygon with a building=x tag. Instead, the main structure itself is tagged with both a building=x tag AND a building:part=x tag. This is not recommended tagging, but it can definitely happen a lot more often, especially for buildings being "converted" to Simple 3D Building tagging scheme when people do not completely understand the tagging scheme, or interpret it otherwise. In addition, there is the special tag building=roof that I have mentioned before, and that occasionally may be also be part of a type=building relation, potentially also tagged with building:part=x.

Anyway, considering this type of building does show up in the osm2pgsql / Mapnik / openstreetmap-carto render pipeline, my suggestion is to ignore any building:part=x tag if there is also a building=x tag, and to set these features to osmSupportingElement=no for rendering anyway.

So a building=x tag takes precedence over a building:part=x tag if present.

This change may cause some features to get overlapping objects, in case there are both building parts with a building=x tag, and an outline multipolygon with building=x. I don't consider this a real problem, because it is mainly a tagging issue.

3d_building_issue-berliner_dom 3d_building_issue-berliner_dom-way_313670734

mboeringa commented 9 years ago

Hi Thomas,

We are getting closer and closer to the ultimate goal, see the image below of the Berliner Dom, that is now properly rendered. However, I encountered another issue with Schloss Bellevue in Berlin. See the 2nd and 3rd image. As you can see in the second image, the main wing of the castle building is missing in my renderer. I think this may be a result of the single node (https://www.openstreetmap.org/node/2351110202) tagged with a building=entrance tag, that is shared with the polygon, which has its own building=yes tag. You can see this node selected in the 3rd image. I see no other difference with the properly rendered side wings that might cause this, besides this node with building=x. All of these building parts have both a building=x and building:part=x tag, so that can not be a cause of the difference.

berliner_dom_fixed

schloss_bellevue_arcgis_renderer

schloss_bellevue_osm