voxcity 0.4.4__tar.gz → 0.4.5__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.4.4 → voxcity-0.4.5}/PKG-INFO +1 -1
- {voxcity-0.4.4 → voxcity-0.4.5}/pyproject.toml +1 -1
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/geoprocessor/mesh.py +14 -3
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/simulator/view.py +2 -1
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/utils/visualization.py +3 -3
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity.egg-info/PKG-INFO +1 -1
- {voxcity-0.4.4 → voxcity-0.4.5}/AUTHORS.rst +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/CONTRIBUTING.rst +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/HISTORY.rst +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/LICENSE +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/MANIFEST.in +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/README.md +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/docs/Makefile +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/docs/archive/README.rst +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/docs/authors.rst +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/docs/conf.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/docs/index.rst +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/docs/make.bat +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/setup.cfg +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/__init__.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/downloader/__init__.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/downloader/eubucco.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/downloader/gee.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/downloader/mbfp.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/downloader/oemj.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/downloader/omt.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/downloader/osm.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/downloader/overture.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/downloader/utils.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/exporter/__init_.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/exporter/envimet.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/exporter/magicavoxel.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/exporter/obj.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/generator.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/geoprocessor/__init_.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/geoprocessor/draw.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/geoprocessor/grid.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/geoprocessor/network.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/geoprocessor/polygon.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/geoprocessor/utils.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/simulator/__init_.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/simulator/solar.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/simulator/utils.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/utils/__init_.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/utils/lc.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/utils/material.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity/utils/weather.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity.egg-info/SOURCES.txt +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity.egg-info/dependency_links.txt +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity.egg-info/requires.txt +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/src/voxcity.egg-info/top_level.txt +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/tests/__init__.py +0 -0
- {voxcity-0.4.4 → voxcity-0.4.5}/tests/voxelcity.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: voxcity
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.5
|
|
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>
|
|
@@ -4,7 +4,7 @@ import matplotlib.colors as mcolors
|
|
|
4
4
|
import matplotlib.cm as cm
|
|
5
5
|
import matplotlib.pyplot as plt
|
|
6
6
|
|
|
7
|
-
def create_voxel_mesh(voxel_array, class_id, meshsize=1.0, building_id_grid=None):
|
|
7
|
+
def create_voxel_mesh(voxel_array, class_id, meshsize=1.0, building_id_grid=None, mesh_type=None):
|
|
8
8
|
"""
|
|
9
9
|
Create a mesh from voxels preserving sharp edges, scaled by meshsize.
|
|
10
10
|
|
|
@@ -18,6 +18,11 @@ def create_voxel_mesh(voxel_array, class_id, meshsize=1.0, building_id_grid=None
|
|
|
18
18
|
The real-world size of each voxel in meters, for x, y, and z.
|
|
19
19
|
building_id_grid : np.ndarray (2D), optional
|
|
20
20
|
2D grid of building IDs, shape (X, Y). Used when class_id=-3 (buildings).
|
|
21
|
+
mesh_type : str, optional
|
|
22
|
+
Type of mesh to create:
|
|
23
|
+
- None (default): create meshes for boundaries between different classes
|
|
24
|
+
- 'building_solar': only create meshes for boundaries between buildings (-3)
|
|
25
|
+
and void (0) or trees (-2)
|
|
21
26
|
|
|
22
27
|
Returns
|
|
23
28
|
-------
|
|
@@ -81,7 +86,7 @@ def create_voxel_mesh(voxel_array, class_id, meshsize=1.0, building_id_grid=None
|
|
|
81
86
|
(x, y-1, z) # Bottom
|
|
82
87
|
]
|
|
83
88
|
|
|
84
|
-
# Only create faces where there's a transition
|
|
89
|
+
# Only create faces where there's a transition based on mesh_type
|
|
85
90
|
for face_idx, adj_coord in enumerate(adjacent_coords):
|
|
86
91
|
try:
|
|
87
92
|
# If adj_coord is outside array bounds, it's a boundary => face is visible
|
|
@@ -89,7 +94,13 @@ def create_voxel_mesh(voxel_array, class_id, meshsize=1.0, building_id_grid=None
|
|
|
89
94
|
is_boundary = True
|
|
90
95
|
else:
|
|
91
96
|
adj_value = voxel_array[adj_coord]
|
|
92
|
-
|
|
97
|
+
|
|
98
|
+
if mesh_type == 'open_air' and class_id == -3:
|
|
99
|
+
# For building_solar, only create faces at boundaries with void (0) or trees (-2)
|
|
100
|
+
is_boundary = (adj_value == 0 or adj_value == -2)
|
|
101
|
+
else:
|
|
102
|
+
# Default behavior - create faces at any class change
|
|
103
|
+
is_boundary = (adj_value == 0 or adj_value != class_id)
|
|
93
104
|
except IndexError:
|
|
94
105
|
# Out of range => boundary
|
|
95
106
|
is_boundary = True
|
|
@@ -1708,7 +1708,8 @@ def get_surface_view_factor(voxel_data, meshsize, **kwargs):
|
|
|
1708
1708
|
voxel_data,
|
|
1709
1709
|
building_class_id,
|
|
1710
1710
|
meshsize,
|
|
1711
|
-
building_id_grid=building_id_grid
|
|
1711
|
+
building_id_grid=building_id_grid,
|
|
1712
|
+
mesh_type='open_air'
|
|
1712
1713
|
)
|
|
1713
1714
|
if building_mesh is None or len(building_mesh.faces) == 0:
|
|
1714
1715
|
print("No surfaces found in voxel data for the specified class.")
|
|
@@ -1270,7 +1270,7 @@ def visualize_numerical_grid_on_basemap(grid, rectangle_vertices, meshsize, valu
|
|
|
1270
1270
|
plt.tight_layout()
|
|
1271
1271
|
plt.show()
|
|
1272
1272
|
|
|
1273
|
-
def
|
|
1273
|
+
def visualize_numerical_gdf_on_basemap(gdf, value_name="value", cmap='viridis', vmin=None, vmax=None,
|
|
1274
1274
|
alpha=0.6, figsize=(12, 8), basemap='CartoDB light',
|
|
1275
1275
|
show_edge=False, edge_color='black', edge_width=0.5):
|
|
1276
1276
|
"""Visualizes a GeoDataFrame with numerical values on a basemap.
|
|
@@ -1298,7 +1298,7 @@ def visualize_numerical_grid_gdf_on_basemap(gdf, value_name="value", cmap='virid
|
|
|
1298
1298
|
fig, ax = plt.subplots(figsize=figsize)
|
|
1299
1299
|
|
|
1300
1300
|
# Plot the GeoDataFrame
|
|
1301
|
-
gdf_web.plot(column=
|
|
1301
|
+
gdf_web.plot(column=value_name,
|
|
1302
1302
|
ax=ax,
|
|
1303
1303
|
alpha=alpha,
|
|
1304
1304
|
cmap=cmap,
|
|
@@ -1325,7 +1325,7 @@ def visualize_numerical_grid_gdf_on_basemap(gdf, value_name="value", cmap='virid
|
|
|
1325
1325
|
plt.tight_layout()
|
|
1326
1326
|
plt.show()
|
|
1327
1327
|
|
|
1328
|
-
def
|
|
1328
|
+
def visualize_point_gdf_on_basemap(point_gdf, value_name='value', **kwargs):
|
|
1329
1329
|
"""Visualizes a point GeoDataFrame on a basemap with colors based on values.
|
|
1330
1330
|
|
|
1331
1331
|
Args:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: voxcity
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.5
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|