OctreeCity
Digital Twin
Open Source
Open-source Python library for compact, adaptive 3D city models: voxel storage, octrees on demand, sky view and sun analysis, 3D views, and mesh and CFD export.

OctreeCity turns open city data into a compact voxel model that adapts its cell sizes to what matters and keeps every cell labelled (ground, building, tree, water, road, or your own classes). The idea is to build the city once, then use the same model to store it, simulate on it, analyse it, train models on it, and show it.
- Adaptive cells. Octrees split a cell only where there is something to resolve, such as a wall, the ground, or a change in a wind or sun field, so cells are fine next to surfaces and large in open air.
- Environmental analysis in 3D. Sky view factor, shadows, and hours of direct sun at street level, on roofs, or in the air.
- Machine learning. Labelled cells become 2D or 3D arrays, and adaptive cells with their neighbour links form a natural graph.
- Any data source. OpenStreetMap in one line, or your own CityGML (PLATEAU, V-World and others), GeoJSON, footprints, terrain, and trees.
- Sharing. Interactive 3D views in Jupyter and VS Code, OBJ models for Blender, Rhino, or Unity, and an optional OpenFOAM mesh export for CFD.
pip install octreecityPython 3.10 or newer. Current release: 0.1.2.