StrandedKitty / streets-gl

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

roof:orientation with roof:shape=skillion tilts roof in both ways #107

Closed guerda closed 1 year ago

guerda commented 1 year ago

Describe the bug Similar to #55, the roof orientation does not show correctly with the roof:shape=skillion. It seems that the skillion is tilted in both ways at the same time. You can see that if you view a building from two sides:

Expected behavior The skillion should only be tilted in one direction. The ridge should be across to the longest side of the building in that case.

Map location https://streets.gl/#51.24158,6.70798,42.67,132.27,416.09

Screenshots image image image

Both screenshots show the same buildings, once from south south west and from north west. They all have roof:shape=skillion and roof:orientation=across.

System information

sekerob commented 1 year ago

With these one sided roofs like skillion and sloped I restarted adding roof:direction=* in degrees. Sofar the rendering seems to show correctly for me this way. Otherwise it's a guess which way the rain flows.

StrandedKitty commented 1 year ago

Implemented in https://github.com/StrandedKitty/streets-gl/commit/266dd75c9766dd69459d5cd1d5719b5e552721ad, it should work fine now.

Note that it's not the best choice to use roof:orientation on non-symmetrical roof shapes such as skillion or saltbox. With this kind of tagging it's always possible to render a roof in two different ways. So it's better to use roof:direction instead as it clearly specifies which way the roof is facing.

image

guerda commented 1 year ago

Thank you for fixing this!