voxcity 0.3.10__tar.gz → 0.3.12__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.10 → voxcity-0.3.12}/PKG-INFO +1 -1
- {voxcity-0.3.10 → voxcity-0.3.12}/pyproject.toml +1 -1
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/download/eubucco.py +4 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/file/geojson.py +6 -2
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/geo/network.py +43 -1
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/sim/solar.py +2 -2
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity.egg-info/PKG-INFO +1 -1
- {voxcity-0.3.10 → voxcity-0.3.12}/AUTHORS.rst +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/CONTRIBUTING.rst +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/HISTORY.rst +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/LICENSE +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/MANIFEST.in +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/README.md +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/docs/Makefile +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/docs/archive/README.rst +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/docs/authors.rst +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/docs/conf.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/docs/index.rst +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/docs/make.bat +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/setup.cfg +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/__init__.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/download/__init__.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/download/gee.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/download/mbfp.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/download/oemj.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/download/omt.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/download/osm.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/download/overture.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/download/utils.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/file/__init_.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/file/envimet.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/file/magicavoxel.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/file/obj.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/geo/__init_.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/geo/draw.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/geo/grid.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/geo/utils.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/sim/__init_.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/sim/utils.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/sim/view.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/utils/__init_.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/utils/lc.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/utils/material.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/utils/visualization.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/utils/weather.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity/voxcity.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity.egg-info/SOURCES.txt +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity.egg-info/dependency_links.txt +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity.egg-info/requires.txt +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/src/voxcity.egg-info/top_level.txt +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/tests/__init__.py +0 -0
- {voxcity-0.3.10 → voxcity-0.3.12}/tests/voxelcity.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: voxcity
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.12
|
|
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>
|
|
@@ -314,4 +314,8 @@ def load_geojson_from_eubucco(rectangle_vertices, output_dir):
|
|
|
314
314
|
raw_data = json.load(f)
|
|
315
315
|
geojson_data = raw_data['features']
|
|
316
316
|
|
|
317
|
+
# Add id to each building's properties
|
|
318
|
+
for i, feature in enumerate(geojson_data):
|
|
319
|
+
feature['properties']['id'] = i + 1
|
|
320
|
+
|
|
317
321
|
return geojson_data
|
|
@@ -58,11 +58,13 @@ def filter_and_convert_gdf_to_geojson(gdf, rectangle_vertices):
|
|
|
58
58
|
|
|
59
59
|
# Create GeoJSON features from filtered geometries
|
|
60
60
|
features = []
|
|
61
|
+
feature_id = 1
|
|
61
62
|
for idx, row in filtered_gdf.iterrows():
|
|
62
63
|
geom = row['geometry'].__geo_interface__
|
|
63
64
|
properties = {
|
|
64
65
|
'height': row['height'],
|
|
65
|
-
'confidence': row['confidence']
|
|
66
|
+
'confidence': row['confidence'],
|
|
67
|
+
'id': feature_id
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
# Handle MultiPolygon by splitting into separate Polygon features
|
|
@@ -74,10 +76,11 @@ def filter_and_convert_gdf_to_geojson(gdf, rectangle_vertices):
|
|
|
74
76
|
}
|
|
75
77
|
feature = {
|
|
76
78
|
'type': 'Feature',
|
|
77
|
-
'properties': properties,
|
|
79
|
+
'properties': properties.copy(), # Use copy to avoid shared references
|
|
78
80
|
'geometry': single_geom
|
|
79
81
|
}
|
|
80
82
|
features.append(feature)
|
|
83
|
+
feature_id += 1
|
|
81
84
|
elif geom['type'] == 'Polygon':
|
|
82
85
|
feature = {
|
|
83
86
|
'type': 'Feature',
|
|
@@ -85,6 +88,7 @@ def filter_and_convert_gdf_to_geojson(gdf, rectangle_vertices):
|
|
|
85
88
|
'geometry': geom
|
|
86
89
|
}
|
|
87
90
|
features.append(feature)
|
|
91
|
+
feature_id += 1
|
|
88
92
|
else:
|
|
89
93
|
pass # Skip other geometry types
|
|
90
94
|
|
|
@@ -3,13 +3,15 @@ import matplotlib.pyplot as plt
|
|
|
3
3
|
import numpy as np
|
|
4
4
|
import pandas as pd
|
|
5
5
|
import geopandas as gpd
|
|
6
|
-
from shapely.geometry import LineString
|
|
6
|
+
from shapely.geometry import LineString, Polygon
|
|
7
|
+
import shapely.ops as ops
|
|
7
8
|
import networkx as nx
|
|
8
9
|
import osmnx as ox
|
|
9
10
|
import os
|
|
10
11
|
import shapely
|
|
11
12
|
from shapely.geometry import Point
|
|
12
13
|
from shapely.ops import transform
|
|
14
|
+
import pyproj
|
|
13
15
|
from pyproj import Transformer
|
|
14
16
|
from joblib import Parallel, delayed
|
|
15
17
|
|
|
@@ -484,6 +486,17 @@ def analyze_network_slopes(
|
|
|
484
486
|
|
|
485
487
|
# 10) Visualization
|
|
486
488
|
if settings['vis_graph']:
|
|
489
|
+
# Create a Polygon from the rectangle vertices
|
|
490
|
+
rectangle_polygon = Polygon(rectangle_vertices)
|
|
491
|
+
|
|
492
|
+
# Convert the rectangle polygon to the same CRS as edge_gdf_web
|
|
493
|
+
rectangle_gdf = gpd.GeoDataFrame(index=[0], crs='epsg:4326', geometry=[rectangle_polygon])
|
|
494
|
+
rectangle_gdf_web = rectangle_gdf.to_crs(epsg=3857)
|
|
495
|
+
|
|
496
|
+
# Get the bounding box of the rectangle
|
|
497
|
+
minx, miny, maxx, maxy = rectangle_gdf_web.total_bounds
|
|
498
|
+
|
|
499
|
+
# Plot the edges
|
|
487
500
|
edge_gdf_web = edge_gdf.to_crs(epsg=3857)
|
|
488
501
|
fig, ax = plt.subplots(figsize=settings['fig_size'])
|
|
489
502
|
edge_gdf_web.plot(
|
|
@@ -497,9 +510,38 @@ def analyze_network_slopes(
|
|
|
497
510
|
alpha=settings['alpha'],
|
|
498
511
|
legend_kwds={'label': f"{value_name} (%)"}
|
|
499
512
|
)
|
|
513
|
+
|
|
514
|
+
# Add basemap
|
|
500
515
|
ctx.add_basemap(ax, source=settings['basemap_style'], zoom=settings['zoom'])
|
|
516
|
+
|
|
517
|
+
# Set the plot limits to the bounding box of the rectangle
|
|
518
|
+
ax.set_xlim(minx, maxx)
|
|
519
|
+
ax.set_ylim(miny, maxy)
|
|
520
|
+
|
|
521
|
+
# Turn off the axis
|
|
501
522
|
ax.set_axis_off()
|
|
523
|
+
|
|
524
|
+
# Add title
|
|
502
525
|
plt.title(f'Network {value_name} Analysis', pad=20)
|
|
526
|
+
|
|
527
|
+
# Show the plot
|
|
503
528
|
plt.show()
|
|
529
|
+
# edge_gdf_web = edge_gdf.to_crs(epsg=3857)
|
|
530
|
+
# fig, ax = plt.subplots(figsize=settings['fig_size'])
|
|
531
|
+
# edge_gdf_web.plot(
|
|
532
|
+
# column=value_name,
|
|
533
|
+
# ax=ax,
|
|
534
|
+
# cmap=settings['colormap'],
|
|
535
|
+
# legend=True,
|
|
536
|
+
# vmin=settings['vmin'],
|
|
537
|
+
# vmax=settings['vmax'],
|
|
538
|
+
# linewidth=settings['edge_width'],
|
|
539
|
+
# alpha=settings['alpha'],
|
|
540
|
+
# legend_kwds={'label': f"{value_name} (%)"}
|
|
541
|
+
# )
|
|
542
|
+
# ctx.add_basemap(ax, source=settings['basemap_style'], zoom=settings['zoom'])
|
|
543
|
+
# ax.set_axis_off()
|
|
544
|
+
# plt.title(f'Network {value_name} Analysis', pad=20)
|
|
545
|
+
# plt.show()
|
|
504
546
|
|
|
505
547
|
return G, edge_gdf
|
|
@@ -573,7 +573,7 @@ def get_cumulative_global_solar_irradiance(
|
|
|
573
573
|
vmax = kwargs.get("vmax", max(direct_normal_irradiance_scaling, diffuse_irradiance_scaling) * 1000)
|
|
574
574
|
cmap = plt.cm.get_cmap(colormap).copy()
|
|
575
575
|
cmap.set_bad(color='lightgray')
|
|
576
|
-
plt.figure(figsize=(
|
|
576
|
+
plt.figure(figsize=(10, 8))
|
|
577
577
|
# plt.title(f"Global Solar Irradiance at {time_local.strftime('%Y-%m-%d %H:%M:%S')}")
|
|
578
578
|
plt.imshow(global_map, origin='lower', cmap=cmap, vmin=vmin, vmax=vmax)
|
|
579
579
|
plt.axis('off')
|
|
@@ -591,7 +591,7 @@ def get_cumulative_global_solar_irradiance(
|
|
|
591
591
|
vmax = kwargs.get("vmax", np.nanmax(cumulative_map))
|
|
592
592
|
cmap = plt.cm.get_cmap(colormap).copy()
|
|
593
593
|
cmap.set_bad(color='lightgray')
|
|
594
|
-
plt.figure(figsize=(
|
|
594
|
+
plt.figure(figsize=(10, 8))
|
|
595
595
|
# plt.title("Cumulative Global Solar Irradiance Map")
|
|
596
596
|
plt.imshow(cumulative_map, origin='lower', cmap=cmap, vmin=vmin, vmax=vmax)
|
|
597
597
|
plt.colorbar(label='Cumulative Global Solar Irradiance (W/m²·hour)')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: voxcity
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.12
|
|
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
|