voxcity.models.VoxCity

class voxcity.models.VoxCity
voxels: VoxelGrid
buildings: BuildingGrid
land_cover: LandCoverGrid
dem: DemGrid
tree_canopy: CanopyGrid
extras: Dict[str, Any]
to_xarray()

Named-dimension view of the model’s grids as an xarray.Dataset.

Dims are the axis-contract tokens (voxel: ("north", "east", "up"); 2-D grids: ("north", "east")), so every access carries its axis names — ds.dem.isel(north=0) is unambiguously the south edge. Coordinates are cell-centre metres in the (possibly rotated) grid frame: (index + 0.5) * meshsize. DataArrays wrap the existing ndarrays without copying. min_heights (object dtype) and extras are not representable and stay on the dataclass. lon/lat is derivable via voxcity.utils.projector.GridProjector. rotation_angle is derived from extras['rectangle_vertices'] when present (the same source of truth save_results_h5 uses), falling back to extras['rotation_angle'] then 0.0.