voxcity 0.6.14__tar.gz → 0.6.16__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {voxcity-0.6.14 → voxcity-0.6.16}/PKG-INFO +1 -1
- {voxcity-0.6.14 → voxcity-0.6.16}/pyproject.toml +1 -1
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/exporter/cityles.py +7 -4
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/generator.py +1196 -1136
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/geoprocessor/draw.py +4 -9
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/geoprocessor/grid.py +166 -1
- {voxcity-0.6.14 → voxcity-0.6.16}/AUTHORS.rst +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/LICENSE +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/README.md +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/__init__.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/downloader/__init__.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/downloader/citygml.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/downloader/eubucco.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/downloader/gee.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/downloader/mbfp.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/downloader/oemj.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/downloader/osm.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/downloader/overture.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/downloader/utils.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/exporter/__init__.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/exporter/envimet.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/exporter/magicavoxel.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/exporter/obj.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/geoprocessor/__init__.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/geoprocessor/mesh.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/geoprocessor/network.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/geoprocessor/polygon.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/geoprocessor/utils.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/simulator/__init__.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/simulator/solar.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/simulator/utils.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/simulator/view.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/utils/__init__.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/utils/lc.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/utils/material.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/utils/visualization.py +0 -0
- {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/utils/weather.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "voxcity"
|
|
3
|
-
version = "0.6.
|
|
3
|
+
version = "0.6.16"
|
|
4
4
|
description = "voxcity is an easy and one-stop tool to output 3d city models for microclimate simulation by integrating multiple geospatial open-data"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -322,7 +322,7 @@ def export_dem(dem_grid, output_path):
|
|
|
322
322
|
f.write(f"{i_1based} {j_1based} {elevation:.1f}\n")
|
|
323
323
|
|
|
324
324
|
|
|
325
|
-
def export_vmap(canopy_height_grid, output_path, tree_base_ratio=0.3, tree_type='default', building_height_grid=None):
|
|
325
|
+
def export_vmap(canopy_height_grid, output_path, tree_base_ratio=0.3, tree_type='default', building_height_grid=None, canopy_bottom_height_grid=None):
|
|
326
326
|
"""
|
|
327
327
|
Export vmap.txt file for CityLES
|
|
328
328
|
|
|
@@ -363,7 +363,10 @@ def export_vmap(canopy_height_grid, output_path, tree_base_ratio=0.3, tree_type=
|
|
|
363
363
|
i_1based = i + 1
|
|
364
364
|
j_1based = j + 1
|
|
365
365
|
total_height = float(effective_canopy[j, i])
|
|
366
|
-
|
|
366
|
+
if canopy_bottom_height_grid is not None:
|
|
367
|
+
lower_height = float(np.clip(canopy_bottom_height_grid[j, i], 0.0, total_height))
|
|
368
|
+
else:
|
|
369
|
+
lower_height = total_height * tree_base_ratio
|
|
367
370
|
upper_height = total_height
|
|
368
371
|
# Format: i j lower_height upper_height tree_type
|
|
369
372
|
f.write(f"{i_1based} {j_1based} {lower_height:.1f} {upper_height:.1f} {tree_code}\n")
|
|
@@ -413,7 +416,7 @@ def export_cityles(building_height_grid, building_id_grid, canopy_height_grid,
|
|
|
413
416
|
land_cover_grid, dem_grid, meshsize, land_cover_source,
|
|
414
417
|
rectangle_vertices, output_directory="output/cityles",
|
|
415
418
|
building_material='default', tree_type='default',
|
|
416
|
-
tree_base_ratio=0.3, **kwargs):
|
|
419
|
+
tree_base_ratio=0.3, canopy_bottom_height_grid=None, **kwargs):
|
|
417
420
|
"""
|
|
418
421
|
Export VoxCity data to CityLES format
|
|
419
422
|
|
|
@@ -473,7 +476,7 @@ def export_cityles(building_height_grid, building_id_grid, canopy_height_grid,
|
|
|
473
476
|
export_dem(dem_grid, output_path)
|
|
474
477
|
|
|
475
478
|
print("\nExporting vmap.txt...")
|
|
476
|
-
export_vmap(canopy_height_grid, output_path, tree_base_ratio, tree_type, building_height_grid=building_height_grid)
|
|
479
|
+
export_vmap(canopy_height_grid, output_path, tree_base_ratio, tree_type, building_height_grid=building_height_grid, canopy_bottom_height_grid=canopy_bottom_height_grid)
|
|
477
480
|
|
|
478
481
|
print("\nExporting lonlat.txt...")
|
|
479
482
|
export_lonlat(rectangle_vertices, building_height_grid.shape, output_path)
|