3D Tiles and CityGML: OGC Standards for Smart Cities
Digital City Twins
A digital city twin is a three-dimensional model that combines building geometry, terrain, infrastructure, and sensor data into a unified digital environment. Such models are used for urban planning, solar analysis, flood simulation, transport optimization, and energy auditing.
Two key OGC standards underpin this technology: CityGML for semantic modeling and 3D Tiles for web visualization.
CityGML: Semantic City Model
What Is CityGML
CityGML is an OGC standard for representing and exchanging 3D city models. Unlike regular 3D formats (STL, OBJ, FBX), CityGML stores not just geometry but also semantics: walls, roofs, windows, doors, building floors -- each is a separate object with attributes.
CityGML is based on GML (Geography Markup Language) and uses XML format. Version 3.0, adopted in 2021, significantly simplified the data model and added support for dynamic data (sensor readings, infrastructure status).
Levels of Detail (LOD)
CityGML defines 5 levels of detail -- from rough outline to full architectural model:
| LOD | Description | Geometry | Application |
|---|---|---|---|
| LOD0 | Building outline (2.5D) | Footprint polygon + height | Regional planning |
| LOD1 | Block model | Footprint extrusion | Overview visualizations |
| LOD2 | Roofs and walls | Thematic surfaces | Solar analysis, noise |
| LOD3 | Architectural detail | Windows, doors, balconies | Detailed modeling |
| LOD4 | Interior | Rooms, furniture, utilities | BIM integration |
For most smart city tasks, LOD2 is sufficient: it enables solar illumination modeling, solar panel potential assessment, noise pollution analysis, and building heat loss calculations.
CityGML Thematic Modules
CityGML includes modules for different object types:
- Building -- buildings (core module)
- Transportation -- roads, sidewalks, railways
- Vegetation -- trees, shrubs, lawns
- WaterBody -- rivers, lakes, seas
- CityFurniture -- streetlights, benches, traffic lights
- Bridge -- bridges and overpasses
- Tunnel -- tunnels
- LandUse -- functional zoning
- Relief -- digital terrain model
3D Tiles: Web Visualization
What Are 3D Tiles
3D Tiles is an OGC standard for streaming massive 3D geodata in web applications. Developed by Cesium and adopted by OGC in 2019.
If CityGML is a format for storage and analysis, then 3D Tiles is a format for visualization. It solves the main problem of 3D maps: how to display millions of buildings without freezing the browser.
How It Works
3D Tiles organizes data in a hierarchical tile structure -- similar to a 2D tile pyramid but in three dimensions:
tileset.json -- root file, describes hierarchy
├── tile_0.b3dm -- low detail (entire city)
├── tile_1/
│ ├── tile_1_0.b3dm -- medium detail (district)
│ ├── tile_1_1.b3dm
│ └── tile_1_2.b3dm
└── tile_2/
├── tile_2_0.b3dm -- high detail (block)
└── ...
When a user zooms into a particular area, more detailed tiles are loaded for that region. Distant buildings remain at low detail. This is called Hierarchical Level of Detail (HLOD).
Content Types in 3D Tiles
- b3dm (Batched 3D Model) -- batch of buildings in one tile (glTF inside)
- i3dm (Instanced 3D Model) -- repeated objects (trees, streetlights)
- pnts (Point Cloud) -- point clouds (LiDAR)
- cmpt (Composite) -- combination of the above
3D Tiles 1.1 unified all types through glTF + extensions, simplifying the ecosystem.
Cesium: Visualization Platform
Cesium is the primary platform for working with 3D Tiles. Cesium JS (open source) allows creating 3D maps in the browser:
const viewer = new Cesium.Viewer('cesiumContainer', {
terrain: Cesium.Terrain.fromWorldTerrain()
});
// Load 3D Tiles
const tileset = await Cesium.Cesium3DTileset.fromUrl(
'https://example.com/city/tileset.json'
);
viewer.scene.primitives.add(tileset);
// Style by attributes
tileset.style = new Cesium.Cesium3DTileStyle({
color: {
conditions: [
["${height} > 100", "color('red')"],
["${height} > 50", "color('orange')"],
["true", "color('white')"]
]
}
});
// Fly to city
viewer.zoomTo(tileset);
Cesium ion (cloud platform) processes CityGML, Shapefile, LAS/LAZ and converts to 3D Tiles automatically.
CityJSON: Lightweight CityGML Alternative
XML-based CityGML is a heavy format. A city's CityGML file can weigh gigabytes and is difficult to parse. CityJSON solves this: it's a JSON encoding of CityGML that is 6-8 times more compact.
{
"type": "CityJSON",
"version": "2.0",
"CityObjects": {
"building_001": {
"type": "Building",
"attributes": {
"measuredHeight": 25.5,
"yearOfConstruction": 1985,
"function": "residential"
},
"geometry": [...]
}
}
}
CityJSON supports the same LODs and thematic modules as CityGML, but is easier to work with: Python library cjio, QGIS plugin, validator val3dity.
Applications in Urban Planning
Solar Analysis
A 3D city model allows calculating solar illumination of every building surface for any period. This is critical for: - Assessing rooftop solar panel potential - Analyzing shading from new buildings - Calculating natural lighting in apartments
Noise Modeling
CityGML with LOD2 and road traffic data enables modeling noise propagation in the city. Results are visualized in 3D Tiles: a noise map overlaid on buildings.
Energy Auditing
Knowing wall and roof geometry (LOD2-LOD3), materials, and climate data, you can calculate heat losses for every building. Germany, the Netherlands, and Finland already have CityGML models of their entire territory for energy planning.
Project Visualization
Architects embed BIM models of designed buildings into existing 3D city models. Clients and the public see how a new building will look in its real context.
Workflow: From OSM to 3D City
-
Export data. On osm2cdr.ru, export an area in CityJSON or 3D Tiles format. OpenStreetMap data contains building footprints and heights (
height,building:levelstags). -
Enrich data. Add heights from LiDAR (if available), roof types, facade materials.
-
Convert to 3D Tiles. Use Cesium ion or
py3dtilesto create a tileset. -
Visualize. Deploy a Cesium JS application or upload to Cesium ion for cloud hosting.
Open 3D Model Resources
Many cities publish their CityGML models:
- Berlin (LOD2, 550,000 buildings)
- New York (LOD1-LOD2)
- Helsinki (LOD2-LOD3, with textures)
- Rotterdam (LOD2)
- All of Germany (LOD1-LOD2, LoD-DE)
This data can be combined with OpenStreetMap to create comprehensive 3D models with semantic information.
3D Tiles and CityGML are two standards that together provide a complete cycle: from semantic modeling to interactive browser visualization. A smart city starts with data.