Last week the first code for relations were implemented in “OSM go”.
*** multipolygon: ***
“outer” and “inner” are done (not as way parts yet).
That is useful for “landuse”. Woods do have clearings now, pedestrian path have holes at subway entrances.
There is a known error in Three.js: quite a view holes are not done! May be clipper.js will do it better.
(way/34151096 http://www.osmgo.org/index.html?lat=48.13841&lon=11.57144&ele=62.90&dir=331&view=-53&tiles=1))
*** building: ***
Replacing an “outer” by a bunch of “part”s works fine. But …
https://wiki.openstreetmap.org/wiki/Key:building:part says: "It is also recommended to use a type=building relation to group together the outline way and the building:part=yes ways.” — “recommended” is nice but not done mostly Another acceptable tagging is to give the “outer” also an tag “building:part”.
(way/226672615 OSMgo.org?lat=49.59545&lon=11.00640&ele=53.37&dir=58&view=-10
http://osmbuildings.org/?lat=49.59638&lon=11.00439&zoom=18.6&rotation=-46&tilt=45))
So it has do be detected automatically! A human easily sees if a “part" is inside an “outer”. But what code logic should be used?
**Is there a good ready to use solution for “shape is inside shape”?
**
To compare any “outer” with any “part” is not efficient. Nodes/Ways could be sorted in the Lat- and Lon-axis. I fond another way: The “outer” and the “part” mostly share some nodes. If therer are alt last 3 such nodes, OSM go hides the “outer” except it is also an “building:part”. That’s not 100% correct but works mostly until I will find a “if shape in shape” solution.
A first test showed some steeples without church (also with OSMBuildings.org): The mapper hat only the steeple tagged as “building:part”, and no relation of course. In this case, the “outer” should be tagged with both “building” and part. How to detect such cases? Well, the “outer” should be “propper filled” with “building:part”s. So again that “shape in shape” question and also a kind of volume/area size compare. Or a relavant amount of the buildings nodes should also be a member of a part.
I think, such complex analyes should better be done on a vector tile server. A vector tile should have that relating information. Are there any vector tile servers I could use?
What about this?: If there is a reliable solution, a robot could check the whole OSM data and add the missing relations.
p.s.: Some times an entire building with all its parts is defined only with “building”. The 2D renderer seem to ignore all parts inside the outer. So my solution does not work.