19.3 3D City Models and Digital Twins
Modern urban data — CityGML, CityJSON, BIM/GIS integration, and the digital-twin movement.
Key takeaways
- 3D city models represent buildings, infrastructure, and terrain in full 3D with attributes.
- CityGML / CityJSON are the standards; BIM integrates architecture and construction data.
- Digital twins combine 3D models with live data streams for decision support.
Introduction
Cities are no longer mapped only in 2D. Governments, utilities, and private firms maintain rich 3D models of urban environments, coupled with sensor data, simulation engines, and planning tools. This lesson introduces the standards and applications.
Levels of detail (LoD)
CityGML defines five levels:
- LoD0 — 2D footprint and roof outline.
- LoD1 — flat-roofed "block" buildings.
- LoD2 — differentiated roof shapes.
- LoD3 — detailed architectural features (windows, doors).
- LoD4 — interior geometry.
Most analyses use LoD1 (fast, from footprint + height) or LoD2 (roof shape from LiDAR).
CityGML and CityJSON
- CityGML — XML-based OGC standard. Verbose but comprehensive; feature-rich.
- CityJSON — JSON-based simplification with identical semantics; much easier to work with.
CityJSON example:
1{
2 "type": "CityJSON",
3 "version": "1.1",
4 "CityObjects": {
5 "building-1": {
6 "type": "Building",
7 "attributes": {"height": 42.5, "built_year": 1970},
8 "geometry": [{...}]
9 }
10 }
11}Tools: cjio (Python CLI), Azul (visualiser), 3dfier (build from footprints + DTM).
BIM — Building Information Modeling
Architecture and construction industries use BIM (Revit, IFC) for designing buildings. BIM data includes not just geometry but materials, specifications, maintenance schedules.
IFC (Industry Foundation Classes) is the OGC/ISO-standard BIM exchange format. BIM-GIS integration lets city models include engineering-grade building internals.
Generating 3D models
From LiDAR + footprints:
- Extract building footprints from OSM or cadastre.
- Classify LiDAR returns into ground, building, vegetation.
- Compute each footprint's mean or 95th-percentile roof height.
- Extrude the footprint to that height (LoD1).
- Optionally fit roof shapes (gabled, hipped) from point cloud (LoD2).
Tools: 3dfier, SketchUp + Sketch-a-Building, Blender + point-cloud plugins.
Visualisation
- CesiumJS — browser-based 3D globe; supports CityGML, 3D Tiles.
- Unity / Unreal — game engines; excellent for immersive visualisations.
- Blender — offline rendering.
- Itowns, MapLibre fill-extrusion — lightweight web-based.
Digital twins
A digital twin is a 3D model + live data streams + simulation capabilities. Examples:
- Singapore Virtual Singapore — full-city twin for urban planning.
- Helsinki 3D+ — public digital twin.
- Rennes — smart-city twin.
Live data sources: traffic sensors, air quality, energy usage, building occupancy. Simulations: flood modelling, shadow analysis, wind flow, noise propagation.
Standards for twins
- CityGML ADE (application domain extensions) for energy, noise, utilities.
- IFC + BIM for building interiors.
- SensorThings API for live sensor data.
- 3D Tiles for visual streaming.
Applications
- Urban planning — visualise proposed developments in context.
- Solar potential analysis — per-roof solar irradiance.
- Flood modelling — 2D / 3D inundation.
- Wind / acoustics — CFD-based simulation.
- Emergency response — situational awareness.
- Tourism / navigation — 3D wayfinding.
A small CityJSON workflow
1import cjio
2[object Object]
3[object Object]
4[object Object]
5[object Object]
6[object Object]
7Privacy and ethics
3D city models can reveal sensitive information — indoor layouts, roof assets, surveillance coverage. Public releases should:
- Exclude interior geometry unless consented.
- Aggregate indoor sensor data.
- Redact facilities with security concerns.
Self-check exercises
1. Why might you choose CityJSON over CityGML for a new project?
CityJSON is dramatically easier to work with — JSON parsing is universal, JavaScript / Python libraries are lighter, and files are 5–10× smaller than equivalent CityGML (XML + namespaces). CityJSON encodes the same semantics, so there's no information loss. Some enterprise tools only speak CityGML; for those, convert with cjio.
2. What separates a "digital twin" from a "3D city model"?
A 3D model is static geometry; a twin adds live data feeds and simulation capability. Twins ingest sensor data (traffic, air quality, occupancy), run analyses (flood propagation, wind flow), and update continuously. Without the dynamic component, it's just a detailed 3D model.
3. How would you build an LoD1 city model from open data?
(1) Fetch building footprints from OSM or a cadastre. (2) Obtain a DTM (SRTM or better). (3) Obtain building heights from LiDAR or OSM's height / building:levels tags (levels × 3 m is a decent approximation). (4) Extrude each footprint from terrain to roof. Tools like 3dfier automate this given the three inputs.
Summary
- 3D city models use LoD hierarchies to balance detail and scale.
- CityGML / CityJSON are the standards; CityJSON is easier to work with.
- BIM + GIS integration brings architectural detail.
- Digital twins add live data and simulation, enabling decision support.
Further reading
- CityGML / CityJSON specifications (cityjson.org).
- OGC 3D Tiles specification.
- Batty, M. — Digital Twins (in Environment and Planning B).
- Virtual Singapore and Helsinki 3D+ case studies.