StrandedKitty / streets-gl

🗺 OpenStreetMap 3D renderer powered by WebGL2
http://streets.gl
MIT License
598 stars 44 forks source link

`height` does not influence roof height #111

Open westnordost opened 1 year ago

westnordost commented 1 year ago

Describe the bug I 3D-mapped the Alcázar in Toledo. Note the towers: https://streets.gl/#39.85801,-4.02061,25.50,323.25,302.07

They have a total height of 60 meters. 4 regular levels and about 2 roof levels. (Tagged as such.) The height of the roof levels is not explicitly given. The roof appears too flat.

Screenshot 2023-05-18 at 13 22 06

Expected behavior

height refers to the total height of the building (part), i.e. regular levels + roof levels. Hence, if the total height is given but not the roof height, I'd expect the roof height to be estimated from the other given values, in this case, the ratio between roof levels and building levels (assuming that regular levels and roof levels do have more or less the same height in one building part).

Not sure if the issue is that height is interpreted to be only the building:height or if the issue is that the ratio between building:levels and roof:levels is not taken into account when filling in incomplete values.

StrandedKitty commented 1 year ago

I agree that it's not the best interpretation of this tagging.

I need to come up with a robust system of some sort to handle incomplete tagging like this, but for now I don't really have any ideas on how to handle such a big number of edge cases. There's up to 6 variables per building (min_height, height, roof height, min_levels, levels, roof levels), so quite a lot of different combinations are possible.

westnordost commented 1 year ago

Hm, to have a bunch of equations and a variable number of given values... I guess it can become complex to implement solving it into any direction.

This seems to be the perfect use case for logical programming languages like prolog etc. ... maybe some lib for typescript exists that implementthis kind of paradigm.

But anyway, in the end, the equations are always solved towards the same values, so it is probably overkill to use another programming paradigm for that.

Discostu36 commented 1 year ago

Related: #87