voxcity.exporter.cityles ======================== .. py:module:: voxcity.exporter.cityles .. autoapi-nested-parse:: 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 ------- .. toctree:: :hidden: /autoapi/voxcity/exporter/cityles/CityLesExporter .. autoapisummary:: voxcity.exporter.cityles.CityLesExporter Functions --------- .. autoapisummary:: voxcity.exporter.cityles.export_cityles Module Contents --------------- .. py:function:: 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) Export VoxCity data to CityLES format Parameters: ----------- city : VoxCity A VoxCity model instance. output_directory : str Output directory path. building_material : str Building material type for mapping. tree_type : str Tree type for mapping. trunk_height_ratio : float, 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 existing ``city.tree_canopy.bottom`` is used if available, otherwise a default ratio of 0.3 is applied. canopy_bottom_height_grid : numpy.ndarray, optional Explicit canopy bottom height grid. Ignored when *trunk_height_ratio* is explicitly provided. under_tree_class_name : str Ground land-cover class to assign under tree canopy. under_tree_cityles_code : int, optional Override CityLES code for under-tree class. land_cover_source : str, optional Source of land cover data. Auto-detected from VoxCity extras when omitted. **kwargs : dict Additional parameters (for compatibility). Returns: -------- str : Path to output directory