-
Notifications
You must be signed in to change notification settings - Fork 5
Rendering support for building roofs? #18
Comments
One could imagine a 3D analogue to a "line cap" property, to enhance uses cases like mapbox/mapbox-gl-style-spec#456 (comment) where the extruded geometries represent bar-chart-like data rather than physical features. But for the most part, I think the particular roof shapes we'd want to support are so specific to buildings that they couldn't even be generalized to support, say, extruded fountains. |
The roof shape tagging is very OSM-specific, and only covers building rendering while there are all kinds of other uses for 3D visualization. Say GL supported a generalized 3D mesh format:
|
We will have to make a major Vector Tile spec revision though, designing an new encoding scheme for 3D meshes. This may be fine, but worth noting. Another appeal of the client-side mesh generation from roof properties is that we can have adaptive detalization of the mesh (e.g. when overzooming to a building), while a pre-generated mesh would either be too simple, or take a lot of size encoded in VT. |
migrated to mapbox/mapbox-gl-js#3998 |
From #17 (comment)
What would it take to implement roof rendering for buildings, so we can improve the accuracy of renderings of complex and high-profile landmarks?
Some questions I've been thinking about:
Which OSM keys would we support?
OSM currently has 1,028,142 features with a
roof:shape
tag (773,099 if you subtract theflat
values, which would render identically to having noroof:shape
tag).205,223* of these features also have a
roof:height
and/orroof:level
value. These values would be helpful not just to render accurate height, but to give certain distinctive-looking roofs the proper proportions (e.g. very elongated pyramid-shaped roofs on cathedrals).The rest of the roof tags are probably not useful (either not relevant, or are not used widely enough).
How would we represent roof properties in the spec?
The current spec additions that @lbud has added to her working branch are all for a generic
extrusion
type, not a type specific to buildings, which I think makes sense. Adding roofs complicates this a bit. Some (possibly questionable) options:extrusion-top-shape
andextrusion-top-height
properties (or however they would be named). This would involve creating support for a bunch of simple 3D shapes. By far the most common are various triangular prisms and pyramids, but also includes spherical domes and onion domes. Are there use cases for additional geometries on top of an extrusion, besides for buildings?3d
or something. This type would require both3d-shape
and3d-height
properties as above, and also a3d-min-height
. As above, it would require support for rendering a variety of simple 3D shapes. I haven't really thought this option through.Anyone who has any ideas of how this could work, and how big of a lift it would be, please chime in!
* 107,464 (# of roof:height) + 116,983 (# of roof:level) - 19,224 (# with both) = 205,223
/cc @lbud @ajashton @mapbox/gl
The text was updated successfully, but these errors were encountered: