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.
Files changed (37) hide show
  1. {voxcity-0.6.14 → voxcity-0.6.16}/PKG-INFO +1 -1
  2. {voxcity-0.6.14 → voxcity-0.6.16}/pyproject.toml +1 -1
  3. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/exporter/cityles.py +7 -4
  4. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/generator.py +1196 -1136
  5. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/geoprocessor/draw.py +4 -9
  6. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/geoprocessor/grid.py +166 -1
  7. {voxcity-0.6.14 → voxcity-0.6.16}/AUTHORS.rst +0 -0
  8. {voxcity-0.6.14 → voxcity-0.6.16}/LICENSE +0 -0
  9. {voxcity-0.6.14 → voxcity-0.6.16}/README.md +0 -0
  10. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/__init__.py +0 -0
  11. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/downloader/__init__.py +0 -0
  12. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/downloader/citygml.py +0 -0
  13. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/downloader/eubucco.py +0 -0
  14. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/downloader/gee.py +0 -0
  15. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/downloader/mbfp.py +0 -0
  16. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/downloader/oemj.py +0 -0
  17. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/downloader/osm.py +0 -0
  18. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/downloader/overture.py +0 -0
  19. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/downloader/utils.py +0 -0
  20. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/exporter/__init__.py +0 -0
  21. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/exporter/envimet.py +0 -0
  22. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/exporter/magicavoxel.py +0 -0
  23. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/exporter/obj.py +0 -0
  24. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/geoprocessor/__init__.py +0 -0
  25. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/geoprocessor/mesh.py +0 -0
  26. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/geoprocessor/network.py +0 -0
  27. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/geoprocessor/polygon.py +0 -0
  28. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/geoprocessor/utils.py +0 -0
  29. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/simulator/__init__.py +0 -0
  30. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/simulator/solar.py +0 -0
  31. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/simulator/utils.py +0 -0
  32. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/simulator/view.py +0 -0
  33. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/utils/__init__.py +0 -0
  34. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/utils/lc.py +0 -0
  35. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/utils/material.py +0 -0
  36. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/utils/visualization.py +0 -0
  37. {voxcity-0.6.14 → voxcity-0.6.16}/src/voxcity/utils/weather.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: voxcity
3
- Version: 0.6.14
3
+ Version: 0.6.16
4
4
  Summary: voxcity is an easy and one-stop tool to output 3d city models for microclimate simulation by integrating multiple geospatial open-data
5
5
  License: MIT
6
6
  Author: Kunihiko Fujiwara
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "voxcity"
3
- version = "0.6.14"
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
- lower_height = total_height * tree_base_ratio
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)