CityJSON and Digital City Twins: From OSM to Smart City
A digital twin of a city is a 3D model connected to real-world data: building energy consumption, traffic flows, air quality, noise levels. Standards like CityGML and CityJSON form the foundation of these models. OpenStreetMap is one of the best data sources for creating them.
CityJSON: Compact Standard for 3D Cities
CityJSON is a JSON implementation of the CityGML standard, developed by the Open Geospatial Consortium (OGC). Unlike CityGML (XML), CityJSON is 6-10x more compact and more developer-friendly.
Key elements of CityJSON:
- CityObjects — buildings, roads, bridges, trees, water bodies, terrain.
- Geometry — 3D geometry of objects: Solid, MultiSurface, CompositeSurface.
- Semantics — semantic surfaces: roof (RoofSurface), wall (WallSurface), floor (GroundSurface).
- Attributes — arbitrary attributes: construction year, material, function.
- LOD (Level of Detail) — detail levels from LOD0 to LOD4.
{
"type": "CityJSON",
"version": "2.0",
"CityObjects": {
"building_001": {
"type": "Building",
"attributes": {
"yearOfConstruction": 1952,
"function": "residential",
"measuredHeight": 24.5
},
"geometry": [{
"type": "Solid",
"lod": "2",
"boundaries": [[[0, 1, 2, 3], [4, 5, 6, 7]]]
}]
}
},
"vertices": [[37.618, 55.751, 0], [37.619, 55.751, 0], ...]
}
Levels of Detail (LOD)
CityJSON supports 5 levels of detail:
| LOD | Description | Typical Application |
|---|---|---|
| LOD0 | 2.5D — building footprints with height | Overview maps, statistics |
| LOD1 | Extrusion — "boxes" with flat roofs | Visualization, shadowing |
| LOD2 | Roof shapes, walls, bases | Solar energy, noise maps |
| LOD3 | Doors, windows, balconies, textures | Architectural design |
| LOD4 | Interiors, furniture, utilities | BIM, facility management |
OpenStreetMap contains data for LOD0-LOD1 (building footprints + heights from height and building:levels tags). LOD2 and higher require LiDAR data or BIM models.
Digital Twin Applications
Solar Energy
A LOD2 city model allows calculating solar insolation for every roof. This is critical for solar panel planning. Software: Ladybug Tools, Solar3Dcity, Solis.
Noise Modeling
Traffic noise propagates considering buildings as screens. 3D model + traffic flows = noise map according to the CNOSSOS-EU standard. Software: NoiseModelling, CadnaA.
Energy Modeling
A digital twin of a building in CityJSON/IFC contains geometry, materials, glazing. This enables modeling heat loss and energy consumption. Software: EnergyPlus, SimStadt, TEASER.
Urban Planning
Visualization of new construction in the context of existing buildings. Assessment of impact on neighboring buildings' solar access, views, and wind environment.
Exporting 3D Models from OSM
On osm2cdr.ru you can export a city 3D model in several formats:
- CityJSON — OGC standard for 3D cities, LOD1 geometry from OSM.
- CityGML — XML version of the same standard, for enterprise systems.
- IFC — BIM format for integration with Revit, ArchiCAD, Tekla.
- glTF — 3D format for visualization in browsers and games.
Models are built from OpenStreetMap data: building footprints (building=*), heights (height, building:levels), building type (building:material, roof:shape).
Create 3D city models for urban planning projects, energy analysis, and Smart City at osm2cdr.ru.