voxcity 0.3.25__py3-none-any.whl → 0.3.27__py3-none-any.whl
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.
- voxcity/generator.py +17 -4
- {voxcity-0.3.25.dist-info → voxcity-0.3.27.dist-info}/METADATA +2 -2
- {voxcity-0.3.25.dist-info → voxcity-0.3.27.dist-info}/RECORD +7 -7
- {voxcity-0.3.25.dist-info → voxcity-0.3.27.dist-info}/WHEEL +1 -1
- {voxcity-0.3.25.dist-info → voxcity-0.3.27.dist-info}/AUTHORS.rst +0 -0
- {voxcity-0.3.25.dist-info → voxcity-0.3.27.dist-info}/LICENSE +0 -0
- {voxcity-0.3.25.dist-info → voxcity-0.3.27.dist-info}/top_level.txt +0 -0
voxcity/generator.py
CHANGED
|
@@ -82,7 +82,8 @@ def get_land_cover_grid(rectangle_vertices, meshsize, source, output_dir, **kwar
|
|
|
82
82
|
print(f"Data source: {source}")
|
|
83
83
|
|
|
84
84
|
# Initialize Earth Engine for accessing satellite data
|
|
85
|
-
|
|
85
|
+
if source is not "OpenStreetMap":
|
|
86
|
+
initialize_earth_engine()
|
|
86
87
|
|
|
87
88
|
# Create output directory if it doesn't exist
|
|
88
89
|
os.makedirs(output_dir, exist_ok=True)
|
|
@@ -157,7 +158,8 @@ def get_building_height_grid(rectangle_vertices, meshsize, source, output_dir, *
|
|
|
157
158
|
"""
|
|
158
159
|
|
|
159
160
|
# Initialize Earth Engine for accessing satellite data
|
|
160
|
-
|
|
161
|
+
if source is not "OpenStreetMap":
|
|
162
|
+
initialize_earth_engine()
|
|
161
163
|
|
|
162
164
|
print("Creating Building Height grid\n ")
|
|
163
165
|
print(f"Data source: {source}")
|
|
@@ -320,7 +322,7 @@ def get_dem_grid(rectangle_vertices, meshsize, source, output_dir, **kwargs):
|
|
|
320
322
|
image = get_dem_image(roi_buffered, source)
|
|
321
323
|
|
|
322
324
|
# Save DEM data with appropriate resolution based on source
|
|
323
|
-
if source in ["England 1m DTM", 'DEM France 1m', 'DEM France 5m', 'AUSTRALIA 5M DEM']:
|
|
325
|
+
if source in ["England 1m DTM", 'DEM France 1m', 'DEM France 5m', 'AUSTRALIA 5M DEM', 'Netherlands 0.5m DTM']:
|
|
324
326
|
save_geotiff(image, geotiff_path, scale=meshsize, region=roi_buffered, crs='EPSG:4326')
|
|
325
327
|
elif source == 'USGS 3DEP 1m':
|
|
326
328
|
scale = max(meshsize, 1.25)
|
|
@@ -569,7 +571,18 @@ def get_voxcity(rectangle_vertices, building_source, land_cover_source, canopy_h
|
|
|
569
571
|
building_gdf.to_file(save_path, driver='GPKG')
|
|
570
572
|
|
|
571
573
|
# Get canopy height data
|
|
572
|
-
|
|
574
|
+
if canopy_height_source == "Static":
|
|
575
|
+
# Create canopy height grid with same shape as land cover grid
|
|
576
|
+
canopy_height_grid = np.zeros_like(land_cover_grid, dtype=float)
|
|
577
|
+
|
|
578
|
+
# Set default static height for trees (20 meters is a typical average tree height)
|
|
579
|
+
static_tree_height = kwargs.get("static_tree_height", 10.0)
|
|
580
|
+
tree_mask = (land_cover_grid == 4)
|
|
581
|
+
|
|
582
|
+
# Set static height for tree cells
|
|
583
|
+
canopy_height_grid[tree_mask] = static_tree_height
|
|
584
|
+
else:
|
|
585
|
+
canopy_height_grid = get_canopy_height_grid(rectangle_vertices, meshsize, canopy_height_source, output_dir, **kwargs)
|
|
573
586
|
|
|
574
587
|
# Handle DEM - either flat or from source
|
|
575
588
|
if dem_source == "Flat":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: voxcity
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.27
|
|
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>
|
|
@@ -45,7 +45,7 @@ Requires-Dist: pycountry
|
|
|
45
45
|
Requires-Dist: osm2geojson
|
|
46
46
|
Requires-Dist: seaborn
|
|
47
47
|
Requires-Dist: overturemaps
|
|
48
|
-
Requires-Dist: protobuf
|
|
48
|
+
Requires-Dist: protobuf<=3.20.3
|
|
49
49
|
Requires-Dist: timezonefinder
|
|
50
50
|
Requires-Dist: astral
|
|
51
51
|
Requires-Dist: osmnx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
voxcity/__init__.py,sha256=el9v3gfybHOF_GUYPeSOqN0-vCrTW0eU1mcvi0sEfeU,252
|
|
2
|
-
voxcity/generator.py,sha256=
|
|
2
|
+
voxcity/generator.py,sha256=rsS5Z77Esgomho9Bd3HRQeYlncvyEG1CEHUXAB_SHxw,35048
|
|
3
3
|
voxcity/downloader/__init__.py,sha256=OgGcGxOXF4tjcEL6DhOnt13DYPTvOigUelp5xIpTqM0,171
|
|
4
4
|
voxcity/downloader/eubucco.py,sha256=XCkkdEPNuWdrnuxzL80Ext37WsgiCiZGueb-aQV5rvI,14476
|
|
5
5
|
voxcity/downloader/gee.py,sha256=hEN5OvQAltORYnrlPbmYcDequ6lKLmwyTbNaCZ81Vj8,16089
|
|
@@ -29,9 +29,9 @@ voxcity/utils/lc.py,sha256=RwPd-VY3POV3gTrBhM7TubgGb9MCd3nVah_G8iUEF7k,11562
|
|
|
29
29
|
voxcity/utils/material.py,sha256=Vt3IID5Ft54HNJcEC4zi31BCPqi_687X3CSp7rXaRVY,5907
|
|
30
30
|
voxcity/utils/visualization.py,sha256=ufS6aMIaDUmFNTiqQS5If7SgHxMm6unKIIOkFdnSkOQ,54253
|
|
31
31
|
voxcity/utils/weather.py,sha256=P6s1y_EstBL1OGP_MR_6u3vr-t6Uawg8uDckJnoI7FI,21482
|
|
32
|
-
voxcity-0.3.
|
|
33
|
-
voxcity-0.3.
|
|
34
|
-
voxcity-0.3.
|
|
35
|
-
voxcity-0.3.
|
|
36
|
-
voxcity-0.3.
|
|
37
|
-
voxcity-0.3.
|
|
32
|
+
voxcity-0.3.27.dist-info/AUTHORS.rst,sha256=m82vkI5QokEGdcHof2OxK39lf81w1P58kG9ZNNAKS9U,175
|
|
33
|
+
voxcity-0.3.27.dist-info/LICENSE,sha256=-hGliOFiwUrUSoZiB5WF90xXGqinKyqiDI2t6hrnam8,1087
|
|
34
|
+
voxcity-0.3.27.dist-info/METADATA,sha256=-2DQaO2L5yJXuJ5tQv-sC6s-VIip3dcEhbpVtSUpjeo,25186
|
|
35
|
+
voxcity-0.3.27.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
|
36
|
+
voxcity-0.3.27.dist-info/top_level.txt,sha256=00b2U-LKfDllt6RL1R33MXie5MvxzUFye0NGD96t_8I,8
|
|
37
|
+
voxcity-0.3.27.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|