voxcity 0.3.16__tar.gz → 0.3.17__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.

Potentially problematic release.


This version of voxcity might be problematic. Click here for more details.

Files changed (52) hide show
  1. {voxcity-0.3.16 → voxcity-0.3.17}/PKG-INFO +1 -1
  2. {voxcity-0.3.16 → voxcity-0.3.17}/pyproject.toml +1 -1
  3. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/downloader/gee.py +32 -1
  4. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/generator.py +9 -1
  5. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity.egg-info/PKG-INFO +1 -1
  6. {voxcity-0.3.16 → voxcity-0.3.17}/AUTHORS.rst +0 -0
  7. {voxcity-0.3.16 → voxcity-0.3.17}/CONTRIBUTING.rst +0 -0
  8. {voxcity-0.3.16 → voxcity-0.3.17}/HISTORY.rst +0 -0
  9. {voxcity-0.3.16 → voxcity-0.3.17}/LICENSE +0 -0
  10. {voxcity-0.3.16 → voxcity-0.3.17}/MANIFEST.in +0 -0
  11. {voxcity-0.3.16 → voxcity-0.3.17}/README.md +0 -0
  12. {voxcity-0.3.16 → voxcity-0.3.17}/docs/Makefile +0 -0
  13. {voxcity-0.3.16 → voxcity-0.3.17}/docs/archive/README.rst +0 -0
  14. {voxcity-0.3.16 → voxcity-0.3.17}/docs/authors.rst +0 -0
  15. {voxcity-0.3.16 → voxcity-0.3.17}/docs/conf.py +0 -0
  16. {voxcity-0.3.16 → voxcity-0.3.17}/docs/index.rst +0 -0
  17. {voxcity-0.3.16 → voxcity-0.3.17}/docs/make.bat +0 -0
  18. {voxcity-0.3.16 → voxcity-0.3.17}/setup.cfg +0 -0
  19. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/__init__.py +0 -0
  20. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/downloader/__init__.py +0 -0
  21. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/downloader/eubucco.py +0 -0
  22. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/downloader/mbfp.py +0 -0
  23. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/downloader/oemj.py +0 -0
  24. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/downloader/omt.py +0 -0
  25. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/downloader/osm.py +0 -0
  26. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/downloader/overture.py +0 -0
  27. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/downloader/utils.py +0 -0
  28. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/exporter/__init_.py +0 -0
  29. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/exporter/envimet.py +0 -0
  30. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/exporter/magicavoxel.py +0 -0
  31. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/exporter/obj.py +0 -0
  32. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/geoprocessor/__init_.py +0 -0
  33. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/geoprocessor/draw.py +0 -0
  34. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/geoprocessor/grid.py +0 -0
  35. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/geoprocessor/network.py +0 -0
  36. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/geoprocessor/polygon.py +0 -0
  37. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/geoprocessor/utils.py +0 -0
  38. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/simulator/__init_.py +0 -0
  39. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/simulator/solar.py +0 -0
  40. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/simulator/utils.py +0 -0
  41. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/simulator/view.py +0 -0
  42. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/utils/__init_.py +0 -0
  43. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/utils/lc.py +0 -0
  44. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/utils/material.py +0 -0
  45. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/utils/visualization.py +0 -0
  46. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity/utils/weather.py +0 -0
  47. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity.egg-info/SOURCES.txt +0 -0
  48. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity.egg-info/dependency_links.txt +0 -0
  49. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity.egg-info/requires.txt +0 -0
  50. {voxcity-0.3.16 → voxcity-0.3.17}/src/voxcity.egg-info/top_level.txt +0 -0
  51. {voxcity-0.3.16 → voxcity-0.3.17}/tests/__init__.py +0 -0
  52. {voxcity-0.3.16 → voxcity-0.3.17}/tests/voxelcity.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: voxcity
3
- Version: 0.3.16
3
+ Version: 0.3.17
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
  Author-email: Kunihiko Fujiwara <kunihiko@nus.edu.sg>
6
6
  Maintainer-email: Kunihiko Fujiwara <kunihiko@nus.edu.sg>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "voxcity"
3
- version = "0.3.16"
3
+ version = "0.3.17"
4
4
  requires-python = ">=3.10,<3.13"
5
5
  classifiers = [
6
6
  "Programming Language :: Python :: 3.10",
@@ -393,4 +393,35 @@ def save_geotiff_open_buildings_temporal(aoi, geotiff_path):
393
393
  scale=4,
394
394
  region=aoi,
395
395
  file_per_band=False
396
- )
396
+ )
397
+
398
+ def save_geotiff_england_dsm_minus_dtm(roi, geotiff_path, meshsize):
399
+ """Get the height difference between DSM and DTM from England 1m terrain data.
400
+
401
+ Args:
402
+ roi: Earth Engine geometry defining area of interest
403
+ geotiff_path: Output path for GeoTIFF file
404
+ meshsize: Size of each grid cell in meters
405
+
406
+ Returns:
407
+ ee.Image: Image representing DSM minus DTM (building/vegetation heights)
408
+ """
409
+ # Initialize Earth Engine
410
+ ee.Initialize()
411
+
412
+ # Add buffer around ROI to ensure smooth interpolation at edges
413
+ buffer_distance = 100
414
+ roi_buffered = roi.buffer(buffer_distance)
415
+
416
+ collection_name = 'UK/EA/ENGLAND_1M_TERRAIN/2022'
417
+ dtm = ee.Image(collection_name).select('dtm')
418
+ dsm = ee.Image(collection_name).select('dsm_first')
419
+
420
+ # Subtract DTM from DSM to get height difference
421
+ height_diff = dsm.subtract(dtm)
422
+
423
+ # Clip to buffered ROI
424
+ image = height_diff.clip(roi_buffered)
425
+
426
+ # Export as GeoTIFF using meshsize as scale
427
+ save_geotiff(image, geotiff_path, scale=meshsize, region=roi_buffered, crs='EPSG:4326')
@@ -34,7 +34,8 @@ from .downloader.gee import (
34
34
  save_geotiff_esa_land_cover,
35
35
  save_geotiff_esri_landcover,
36
36
  save_geotiff_dynamic_world_v1,
37
- save_geotiff_open_buildings_temporal
37
+ save_geotiff_open_buildings_temporal,
38
+ save_geotiff_england_dsm_minus_dtm
38
39
  )
39
40
  from .geoprocessor.grid import (
40
41
  group_and_label_cells,
@@ -200,6 +201,13 @@ def get_building_height_grid(rectangle_vertices, meshsize, source, output_dir, *
200
201
  geotiff_path_comp = os.path.join(output_dir, "building_height.tif")
201
202
  save_geotiff_open_buildings_temporal(roi, geotiff_path_comp)
202
203
  building_height_grid, building_min_height_grid, building_id_grid, filtered_buildings = create_building_height_grid_from_gdf_polygon(gdf, meshsize, rectangle_vertices, geotiff_path_comp=geotiff_path_comp, complement_height=building_complement_height)
204
+ elif building_complementary_source == "England 1m DSM - DTM":
205
+ # Special case: use temporal height data as complement
206
+ roi = get_roi(rectangle_vertices)
207
+ os.makedirs(output_dir, exist_ok=True)
208
+ geotiff_path_comp = os.path.join(output_dir, "building_height.tif")
209
+ save_geotiff_england_dsm_minus_dtm(roi, geotiff_path_comp, meshsize)
210
+ building_height_grid, building_min_height_grid, building_id_grid, filtered_buildings = create_building_height_grid_from_gdf_polygon(gdf, meshsize, rectangle_vertices, geotiff_path_comp=geotiff_path_comp, complement_height=building_complement_height)
203
211
  else:
204
212
  # Get complementary data from other sources
205
213
  if building_complementary_source == 'Microsoft Building Footprints':
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: voxcity
3
- Version: 0.3.16
3
+ Version: 0.3.17
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
  Author-email: Kunihiko Fujiwara <kunihiko@nus.edu.sg>
6
6
  Maintainer-email: Kunihiko Fujiwara <kunihiko@nus.edu.sg>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes