We’ve just announced the release of Cesium OSM Buildings, a 3D buildings layer covering the entire world.
Cesium OSM Buildings in Denver
Oh, good, you’re back from reading the blog. As one of our CesiumJS power users, you’re probably interested in the technical details. Great!
Similar to Cesium World Terrain, Cesium OSM Buildings is hosted on Cesium ion and is streamed to your end-users’ web browsers on demand. It uses the 3D Tiles format, which arranges tiles into a hierarchical level-of-detail structure so that just the areas that are needed for the current of view - and with appropriate detail - are transferred and loaded. We originally designed 3D Tiles for Cesium, but it has seen fantastic adoption throughout the industry and awhile back it even became an OGC Community Standard. Cesium OSM Buildings arranges the tiles into a loose quadtree. Imagine that each of the dots in the diagram is a building. Buildings are loosely arranged into quadtree tiles, but buildings on tile edges can spill into adjacent tiles without being artificially split in two.
The dataset consists of about 3 million tiles and hundreds of gigabytes, containing in total over 350 million 3D buildings. The buildings themselves are derived from OpenStreetMap’s Planet OSM, and include full OpenStreetMap metadata (“tags” in OSM parlance) for every building and building part. The buildings - and, in fact, the building parts - can be styled on-the-fly using 3D Tiles Styling.
OpenStreetMap does not use triangle meshes or multipatches to describe buildings. Instead, bulidings are represented in the source data as extruded 2D polygons with optional roofs of various shapes on top of them. The flexible schema is described in the OSM wiki’s Simple 3D Buildings page. Our custom pipeline turns these descriptions into triangle meshes in glTF format and batches them together for efficient rendering. Even though the buildings are batched together, however, they are still queryable and styleable as distinct features. This makes it easy for CesiumJS-based applications like Cesium Stories to display the metadata for a building on click.
As we mentioned in the blog post, being based on OpenStreetMap means that anyone can improve the dataset! We think this is very cool. Initially, we’re committing to updating Cesium OSM Buildings on a monthly basis, but we intend to increase the cadence over time. Continuous updates are not out of reach. Anytime we talk about editing OpenStreetMap, however, we want to support the OSM community by reminding everyone: don’t tag for the renderer. Please do fix inaccuracies in the OSM data. You’ll be a legend. But if you happen to find a case where the OSM data is correct yet you’re not happy with how Cesium OSM Buildings renders it, please let us know instead of working around it by editing the data.
We’re not the first to render OpenStreetMap buildings in 3D. But we believe OpenStreetMap 3D buildings and CesiumJS make a tasty pairing, bringing the rich natural environment of Cesium World Terrain together with a useful model of the built environment. On top of that, you can then bring your own data, leveraging the static and dynamic visualization that CesiumJS is famous for. We’re proud of the attractive outlined rendering, enabled by the new CESIUM_primitive_outline glTF extension, which is now implemented in CesiumJS and is available for use in other glTF and 3D Tiles datasets. And we’re proud of the rendering performance, particularly given CesiumJS’s completely unconstrained camera views. For most styles, we’re able to render entire cities using just a single draw call per tile, minimizing the overhead of rendering in a web browser.