voxcity 0.3.5__tar.gz → 0.3.6__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.
- {voxcity-0.3.5 → voxcity-0.3.6}/PKG-INFO +35 -3
- {voxcity-0.3.5 → voxcity-0.3.6}/README.md +34 -2
- {voxcity-0.3.5 → voxcity-0.3.6}/pyproject.toml +1 -1
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/geo/network.py +2 -1
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/sim/solar.py +5 -5
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/utils/weather.py +2 -2
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity.egg-info/PKG-INFO +35 -3
- {voxcity-0.3.5 → voxcity-0.3.6}/AUTHORS.rst +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/CONTRIBUTING.rst +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/HISTORY.rst +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/LICENSE +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/MANIFEST.in +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/docs/Makefile +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/docs/archive/README.rst +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/docs/authors.rst +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/docs/conf.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/docs/index.rst +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/docs/make.bat +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/setup.cfg +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/__init__.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/download/__init__.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/download/eubucco.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/download/gee.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/download/mbfp.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/download/oemj.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/download/omt.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/download/osm.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/download/overture.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/download/utils.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/file/__init_.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/file/envimet.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/file/geojson.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/file/magicavoxel.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/file/obj.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/geo/__init_.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/geo/draw.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/geo/grid.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/geo/utils.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/sim/__init_.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/sim/utils.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/sim/view.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/utils/__init_.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/utils/lc.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/utils/material.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/utils/visualization.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity/voxcity.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity.egg-info/SOURCES.txt +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity.egg-info/dependency_links.txt +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity.egg-info/requires.txt +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/src/voxcity.egg-info/top_level.txt +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/tests/__init__.py +0 -0
- {voxcity-0.3.5 → voxcity-0.3.6}/tests/voxelcity.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: voxcity
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.6
|
|
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>
|
|
@@ -330,7 +330,7 @@ solar_kwargs = {
|
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
# Compute global solar irradiance map (direct + diffuse radiation)
|
|
333
|
-
|
|
333
|
+
solar_grid = get_global_solar_irradiance_using_epw(
|
|
334
334
|
voxcity_grid, # 3D voxel grid representing the urban environment
|
|
335
335
|
meshsize, # Size of each voxel in meters
|
|
336
336
|
calc_type='instantaneous', # Calculate instantaneous irradiance at specified time
|
|
@@ -345,7 +345,7 @@ solar_kwargs["end_time"] = "01-31 23:00:00" # End time for cumulative calculatio
|
|
|
345
345
|
solar_kwargs["output_file_name"] = 'cummulative_solar_irradiance', # Base filename for outputs (without extension)
|
|
346
346
|
|
|
347
347
|
# Calculate cumulative solar irradiance over the specified time period
|
|
348
|
-
|
|
348
|
+
cum_solar_grid = get_global_solar_irradiance_using_epw(
|
|
349
349
|
voxcity_grid, # 3D voxel grid representing the urban environment
|
|
350
350
|
meshsize, # Size of each voxel in meters
|
|
351
351
|
calc_type='cumulative', # Calculate cumulative irradiance over time period instead of instantaneous
|
|
@@ -418,6 +418,38 @@ landmark_vis_map = get_landmark_visibility_map(voxcity_grid, building_id_grid, b
|
|
|
418
418
|
<em>Example Result Saved as OBJ and Rendered in Rhino</em>
|
|
419
419
|
</p>
|
|
420
420
|
|
|
421
|
+
#### Network Analysis:
|
|
422
|
+
|
|
423
|
+
```python
|
|
424
|
+
from voxcity.geo.network import get_network_values
|
|
425
|
+
|
|
426
|
+
network_kwargs = {
|
|
427
|
+
"network_type": "walk", # Type of network to download from OSM (walk, drive, all, etc.)
|
|
428
|
+
"colormap": "magma", # Matplotlib colormap for visualization
|
|
429
|
+
"vis_graph": True, # Whether to display the network visualization
|
|
430
|
+
"vmin": 0.0, # Minimum value for color scaling
|
|
431
|
+
"vmax": 600000, # Maximum value for color scaling
|
|
432
|
+
"edge_width": 2, # Width of network edges in visualization
|
|
433
|
+
"alpha": 0.8, # Transparency of network edges
|
|
434
|
+
"zoom": 16 # Zoom level for basemap
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
G, edge_gdf = get_network_values(
|
|
438
|
+
cum_solar_grid, # Grid of cumulative solar irradiance values
|
|
439
|
+
rectangle_vertices, # Coordinates defining simulation domain boundary
|
|
440
|
+
meshsize, # Size of each grid cell in meters
|
|
441
|
+
value_name='Cumulative Global Solar Irradiance (W/m²·hour)', # Label for values in visualization
|
|
442
|
+
**network_kwargs # Additional visualization and network parameters
|
|
443
|
+
)
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
<p align="center">
|
|
447
|
+
<img src="https://raw.githubusercontent.com/kunifujiwara/VoxCity/main/images/network.png" alt="Example of Graph Output" width="500">
|
|
448
|
+
</p>
|
|
449
|
+
<p align="center">
|
|
450
|
+
<em>Example Result Saved as OBJ and Rendered in Rhino</em>
|
|
451
|
+
</p>
|
|
452
|
+
|
|
421
453
|
## References of Data Sources
|
|
422
454
|
|
|
423
455
|
### Building
|
|
@@ -273,7 +273,7 @@ solar_kwargs = {
|
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
# Compute global solar irradiance map (direct + diffuse radiation)
|
|
276
|
-
|
|
276
|
+
solar_grid = get_global_solar_irradiance_using_epw(
|
|
277
277
|
voxcity_grid, # 3D voxel grid representing the urban environment
|
|
278
278
|
meshsize, # Size of each voxel in meters
|
|
279
279
|
calc_type='instantaneous', # Calculate instantaneous irradiance at specified time
|
|
@@ -288,7 +288,7 @@ solar_kwargs["end_time"] = "01-31 23:00:00" # End time for cumulative calculatio
|
|
|
288
288
|
solar_kwargs["output_file_name"] = 'cummulative_solar_irradiance', # Base filename for outputs (without extension)
|
|
289
289
|
|
|
290
290
|
# Calculate cumulative solar irradiance over the specified time period
|
|
291
|
-
|
|
291
|
+
cum_solar_grid = get_global_solar_irradiance_using_epw(
|
|
292
292
|
voxcity_grid, # 3D voxel grid representing the urban environment
|
|
293
293
|
meshsize, # Size of each voxel in meters
|
|
294
294
|
calc_type='cumulative', # Calculate cumulative irradiance over time period instead of instantaneous
|
|
@@ -361,6 +361,38 @@ landmark_vis_map = get_landmark_visibility_map(voxcity_grid, building_id_grid, b
|
|
|
361
361
|
<em>Example Result Saved as OBJ and Rendered in Rhino</em>
|
|
362
362
|
</p>
|
|
363
363
|
|
|
364
|
+
#### Network Analysis:
|
|
365
|
+
|
|
366
|
+
```python
|
|
367
|
+
from voxcity.geo.network import get_network_values
|
|
368
|
+
|
|
369
|
+
network_kwargs = {
|
|
370
|
+
"network_type": "walk", # Type of network to download from OSM (walk, drive, all, etc.)
|
|
371
|
+
"colormap": "magma", # Matplotlib colormap for visualization
|
|
372
|
+
"vis_graph": True, # Whether to display the network visualization
|
|
373
|
+
"vmin": 0.0, # Minimum value for color scaling
|
|
374
|
+
"vmax": 600000, # Maximum value for color scaling
|
|
375
|
+
"edge_width": 2, # Width of network edges in visualization
|
|
376
|
+
"alpha": 0.8, # Transparency of network edges
|
|
377
|
+
"zoom": 16 # Zoom level for basemap
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
G, edge_gdf = get_network_values(
|
|
381
|
+
cum_solar_grid, # Grid of cumulative solar irradiance values
|
|
382
|
+
rectangle_vertices, # Coordinates defining simulation domain boundary
|
|
383
|
+
meshsize, # Size of each grid cell in meters
|
|
384
|
+
value_name='Cumulative Global Solar Irradiance (W/m²·hour)', # Label for values in visualization
|
|
385
|
+
**network_kwargs # Additional visualization and network parameters
|
|
386
|
+
)
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
<p align="center">
|
|
390
|
+
<img src="https://raw.githubusercontent.com/kunifujiwara/VoxCity/main/images/network.png" alt="Example of Graph Output" width="500">
|
|
391
|
+
</p>
|
|
392
|
+
<p align="center">
|
|
393
|
+
<em>Example Result Saved as OBJ and Rendered in Rhino</em>
|
|
394
|
+
</p>
|
|
395
|
+
|
|
364
396
|
## References of Data Sources
|
|
365
397
|
|
|
366
398
|
### Building
|
|
@@ -180,7 +180,8 @@ def get_network_values(grid, rectangle_vertices, meshsize, value_name='value', *
|
|
|
180
180
|
vmin=settings['vmin'],
|
|
181
181
|
vmax=settings['vmax'],
|
|
182
182
|
linewidth=settings['edge_width'],
|
|
183
|
-
legend_kwds={'label': value_name
|
|
183
|
+
legend_kwds={'label': value_name,
|
|
184
|
+
'shrink': 0.5}) # Make colorbar 50% smaller
|
|
184
185
|
|
|
185
186
|
ctx.add_basemap(ax,
|
|
186
187
|
source=settings['basemap_style'],
|
|
@@ -675,11 +675,11 @@ def get_global_solar_irradiance_using_epw(
|
|
|
675
675
|
return None
|
|
676
676
|
else:
|
|
677
677
|
# Calculate center point of rectangle
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
center_lat = (min(lats) + max(lats)) / 2
|
|
678
|
+
lons = [coord[0] for coord in rectangle_vertices]
|
|
679
|
+
lats = [coord[1] for coord in rectangle_vertices]
|
|
681
680
|
center_lon = (min(lons) + max(lons)) / 2
|
|
682
|
-
|
|
681
|
+
center_lat = (min(lats) + max(lats)) / 2
|
|
682
|
+
target_point = (center_lon, center_lat)
|
|
683
683
|
|
|
684
684
|
# Optional: specify maximum distance in kilometers
|
|
685
685
|
max_distance = 100 # None for no limit
|
|
@@ -687,8 +687,8 @@ def get_global_solar_irradiance_using_epw(
|
|
|
687
687
|
output_dir = kwargs.get("output_dir", "output")
|
|
688
688
|
|
|
689
689
|
epw_file_path, weather_data, metadata = get_nearest_epw_from_climate_onebuilding(
|
|
690
|
-
latitude=center_lat,
|
|
691
690
|
longitude=center_lon,
|
|
691
|
+
latitude=center_lat,
|
|
692
692
|
output_dir=output_dir,
|
|
693
693
|
max_distance=max_distance,
|
|
694
694
|
extract_zip=True,
|
|
@@ -512,8 +512,8 @@ def read_epw_for_solar_simulation(epw_file_path):
|
|
|
512
512
|
month = int(vals[1])
|
|
513
513
|
day = int(vals[2])
|
|
514
514
|
hour = int(vals[3]) - 1
|
|
515
|
-
dni = float(vals[
|
|
516
|
-
dhi = float(vals[
|
|
515
|
+
dni = float(vals[14])
|
|
516
|
+
dhi = float(vals[15])
|
|
517
517
|
timestamp = pd.Timestamp(year, month, day, hour)
|
|
518
518
|
data.append([timestamp, dni, dhi])
|
|
519
519
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: voxcity
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.6
|
|
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>
|
|
@@ -330,7 +330,7 @@ solar_kwargs = {
|
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
# Compute global solar irradiance map (direct + diffuse radiation)
|
|
333
|
-
|
|
333
|
+
solar_grid = get_global_solar_irradiance_using_epw(
|
|
334
334
|
voxcity_grid, # 3D voxel grid representing the urban environment
|
|
335
335
|
meshsize, # Size of each voxel in meters
|
|
336
336
|
calc_type='instantaneous', # Calculate instantaneous irradiance at specified time
|
|
@@ -345,7 +345,7 @@ solar_kwargs["end_time"] = "01-31 23:00:00" # End time for cumulative calculatio
|
|
|
345
345
|
solar_kwargs["output_file_name"] = 'cummulative_solar_irradiance', # Base filename for outputs (without extension)
|
|
346
346
|
|
|
347
347
|
# Calculate cumulative solar irradiance over the specified time period
|
|
348
|
-
|
|
348
|
+
cum_solar_grid = get_global_solar_irradiance_using_epw(
|
|
349
349
|
voxcity_grid, # 3D voxel grid representing the urban environment
|
|
350
350
|
meshsize, # Size of each voxel in meters
|
|
351
351
|
calc_type='cumulative', # Calculate cumulative irradiance over time period instead of instantaneous
|
|
@@ -418,6 +418,38 @@ landmark_vis_map = get_landmark_visibility_map(voxcity_grid, building_id_grid, b
|
|
|
418
418
|
<em>Example Result Saved as OBJ and Rendered in Rhino</em>
|
|
419
419
|
</p>
|
|
420
420
|
|
|
421
|
+
#### Network Analysis:
|
|
422
|
+
|
|
423
|
+
```python
|
|
424
|
+
from voxcity.geo.network import get_network_values
|
|
425
|
+
|
|
426
|
+
network_kwargs = {
|
|
427
|
+
"network_type": "walk", # Type of network to download from OSM (walk, drive, all, etc.)
|
|
428
|
+
"colormap": "magma", # Matplotlib colormap for visualization
|
|
429
|
+
"vis_graph": True, # Whether to display the network visualization
|
|
430
|
+
"vmin": 0.0, # Minimum value for color scaling
|
|
431
|
+
"vmax": 600000, # Maximum value for color scaling
|
|
432
|
+
"edge_width": 2, # Width of network edges in visualization
|
|
433
|
+
"alpha": 0.8, # Transparency of network edges
|
|
434
|
+
"zoom": 16 # Zoom level for basemap
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
G, edge_gdf = get_network_values(
|
|
438
|
+
cum_solar_grid, # Grid of cumulative solar irradiance values
|
|
439
|
+
rectangle_vertices, # Coordinates defining simulation domain boundary
|
|
440
|
+
meshsize, # Size of each grid cell in meters
|
|
441
|
+
value_name='Cumulative Global Solar Irradiance (W/m²·hour)', # Label for values in visualization
|
|
442
|
+
**network_kwargs # Additional visualization and network parameters
|
|
443
|
+
)
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
<p align="center">
|
|
447
|
+
<img src="https://raw.githubusercontent.com/kunifujiwara/VoxCity/main/images/network.png" alt="Example of Graph Output" width="500">
|
|
448
|
+
</p>
|
|
449
|
+
<p align="center">
|
|
450
|
+
<em>Example Result Saved as OBJ and Rendered in Rhino</em>
|
|
451
|
+
</p>
|
|
452
|
+
|
|
421
453
|
## References of Data Sources
|
|
422
454
|
|
|
423
455
|
### Building
|
|
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
|