You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The buildings layer currently carries only dummy=1. I'd like to propose adding optionalheight and min_height fields so that Shortbread tiles can drive 3D extrusion.
We've implemented this in the VersaTiles Planetiler Shortbread profile and it works well in production:
height of the bottom of the building in meters, optional
Both fields are optional: producers may omit them entirely (a strict 1.0-style implementation stays conformant), and consumers that don't render 3D simply ignore them. This is purely additive - geometry, zoom range and existing attributes are unchanged.
The naming matches the other general-purpose OSM schemas, so styles and tooling carry over: OpenMapTiles' building layer has render_height/render_min_height, and the Protomaps basemap has exactly height and min_height as numbers.
Derivation
Same rule as OpenMapTiles and Protomaps, which makes it familiar to most implementers:
height:
height=* or building:height=*, parsed as meters (accepting the usual unit suffixes), else
building:levels=* (or levels=*) × 3.66 m, else
omitted - see below.
min_height:
min_height=* or building:min_height=*, else
building:min_level=* (or min_level=*) × 3.66 m.
Emitted only when min_height > 0.
Implausible values (≥ 3660 m, i.e. 1000 levels - almost always tagging errors) are dropped.
No synthetic default. A building with no height information at all should simply have no height - absent means "unknown". A style that wants every building extruded can supply its own fallback with a single MapLibre coalesce. This keeps tiles smaller, since the majority of OSM buildings have no height tagging.
Open questions
Rounding / type. We round height up and min_height down to whole meters to keep tiles small; the spec could either mandate integers or leave the precision to the implementation.
Relation to buildings layer containing dummy=1 #77. This is the strongest argument for dropping dummy=1: the reason it exists is that the layer has no properties, and height gives the layer a genuinely useful one. The two are independent though - dummy can be dropped with or without this.
Follow-up, not part of this issue: OSM Simple 3D Buildingsbuilding:part polygons plus a way to mark the relation outline that must not be extruded (OpenMapTiles uses a hide_3d flag; Protomaps distinguishes kind=building from kind=building_part), and later possibly roof:shape / roof:height / colour. We have building:part implemented as a separate opt-in as well, but it's a bigger discussion and I'd rather see plain height land first.
Happy to write the spec text and example fixtures for 1.1 if there's agreement in principle.
The
buildingslayer currently carries onlydummy=1. I'd like to propose adding optionalheightandmin_heightfields so that Shortbread tiles can drive 3D extrusion.We've implemented this in the VersaTiles Planetiler Shortbread profile and it works well in production:
Proposal
Add to the
buildingslayer (polygon, z14):heightmin_heightBoth fields are optional: producers may omit them entirely (a strict 1.0-style implementation stays conformant), and consumers that don't render 3D simply ignore them. This is purely additive - geometry, zoom range and existing attributes are unchanged.
The naming matches the other general-purpose OSM schemas, so styles and tooling carry over: OpenMapTiles'
buildinglayer hasrender_height/render_min_height, and the Protomaps basemap has exactlyheightandmin_heightas numbers.Derivation
Same rule as OpenMapTiles and Protomaps, which makes it familiar to most implementers:
height:height=*orbuilding:height=*, parsed as meters (accepting the usual unit suffixes), elsebuilding:levels=*(orlevels=*) × 3.66 m, elsemin_height:min_height=*orbuilding:min_height=*, elsebuilding:min_level=*(ormin_level=*) × 3.66 m.Emitted only when
min_height> 0.Implausible values (≥ 3660 m, i.e. 1000 levels - almost always tagging errors) are dropped.
No synthetic default. A building with no height information at all should simply have no
height- absent means "unknown". A style that wants every building extruded can supply its own fallback with a single MapLibrecoalesce. This keeps tiles smaller, since the majority of OSM buildings have no height tagging.Open questions
heightup andmin_heightdown to whole meters to keep tiles small; the spec could either mandate integers or leave the precision to the implementation.buildingslayer containingdummy=1#77. This is the strongest argument for droppingdummy=1: the reason it exists is that the layer has no properties, andheightgives the layer a genuinely useful one. The two are independent though -dummycan be dropped with or without this.building:partpolygons plus a way to mark the relation outline that must not be extruded (OpenMapTiles uses ahide_3dflag; Protomaps distinguisheskind=buildingfromkind=building_part), and later possiblyroof:shape/roof:height/colour. We havebuilding:partimplemented as a separate opt-in as well, but it's a bigger discussion and I'd rather see plainheightland first.Happy to write the spec text and example fixtures for 1.1 if there's agreement in principle.