voxcity.exporter.cityles¶
CityLES export module for VoxCity Exports VoxCity grid data to CityLES input file format Updated 2025/08/05 with corrected land use and building material codes Integrated with VoxCity land cover utilities
Notes: - This module expects raw land cover grids as produced per-source by VoxCity, not
standardized/converted indices. Supported sources: ‘OpenStreetMap’, ‘Urbanwatch’, ‘OpenEarthMapJapan’, ‘ESA WorldCover’, ‘ESRI 10m Annual Land Cover’, ‘Dynamic World V1’.
Classes¶
Exporter adapter to write a VoxCity model to CityLES text files. |
Functions¶
|
Export VoxCity data to CityLES format |
Module Contents¶
- voxcity.exporter.cityles.export_cityles(city: voxcity.models.VoxCity, output_directory: str = 'output/cityles', building_material: str = 'default', tree_type: str = 'default', trunk_height_ratio: float = _TRUNK_RATIO_SENTINEL, canopy_bottom_height_grid=None, under_tree_class_name: str = 'Bareland', under_tree_cityles_code=None, land_cover_source: str | None = None, **kwargs)[source]¶
Export VoxCity data to CityLES format
Parameters:¶
- cityVoxCity
A VoxCity model instance.
- output_directorystr
Output directory path.
- building_materialstr
Building material type for mapping.
- tree_typestr
Tree type for mapping.
- trunk_height_ratiofloat, optional
Ratio of trunk height to total canopy height. When explicitly provided, the canopy bottom height grid is always recomputed as
canopy_top * trunk_height_ratio, even when the VoxCity object already contains a per-cell canopy bottom grid. When omitted the existingcity.tree_canopy.bottomis used if available, otherwise a default ratio of 0.3 is applied.- canopy_bottom_height_gridnumpy.ndarray, optional
Explicit canopy bottom height grid. Ignored when trunk_height_ratio is explicitly provided.
- under_tree_class_namestr
Ground land-cover class to assign under tree canopy.
- under_tree_cityles_codeint, optional
Override CityLES code for under-tree class.
- land_cover_sourcestr, optional
Source of land cover data. Auto-detected from VoxCity extras when omitted.
- **kwargsdict
Additional parameters (for compatibility).
Returns:¶
str : Path to output directory