voxcity 0.3.11__tar.gz → 0.3.13__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.11 → voxcity-0.3.13}/PKG-INFO +2 -2
- {voxcity-0.3.11 → voxcity-0.3.13}/README.md +1 -1
- {voxcity-0.3.11 → voxcity-0.3.13}/pyproject.toml +2 -2
- {voxcity-0.3.11 → voxcity-0.3.13}/src/voxcity/__init__.py +1 -1
- {voxcity-0.3.11/src/voxcity/download → voxcity-0.3.13/src/voxcity/downloader}/eubucco.py +5 -1
- {voxcity-0.3.11/src/voxcity/download → voxcity-0.3.13/src/voxcity/downloader}/mbfp.py +2 -2
- {voxcity-0.3.11/src/voxcity/file → voxcity-0.3.13/src/voxcity/exporter}/envimet.py +2 -2
- voxcity-0.3.11/src/voxcity/voxcity.py → voxcity-0.3.13/src/voxcity/generator.py +9 -9
- {voxcity-0.3.11/src/voxcity/geo → voxcity-0.3.13/src/voxcity/geoprocessor}/__init_.py +1 -0
- {voxcity-0.3.11/src/voxcity/geo → voxcity-0.3.13/src/voxcity/geoprocessor}/draw.py +2 -1
- {voxcity-0.3.11/src/voxcity/geo → voxcity-0.3.13/src/voxcity/geoprocessor}/grid.py +2 -2
- {voxcity-0.3.11/src/voxcity/geo → voxcity-0.3.13/src/voxcity/geoprocessor}/network.py +49 -7
- voxcity-0.3.11/src/voxcity/file/geojson.py → voxcity-0.3.13/src/voxcity/geoprocessor/polygon.py +7 -3
- {voxcity-0.3.11/src/voxcity/sim → voxcity-0.3.13/src/voxcity/simulator}/solar.py +1 -1
- {voxcity-0.3.11/src/voxcity/sim → voxcity-0.3.13/src/voxcity/simulator}/view.py +2 -2
- {voxcity-0.3.11 → voxcity-0.3.13}/src/voxcity/utils/visualization.py +2 -2
- {voxcity-0.3.11 → voxcity-0.3.13}/src/voxcity.egg-info/PKG-INFO +2 -2
- voxcity-0.3.13/src/voxcity.egg-info/SOURCES.txt +50 -0
- voxcity-0.3.11/src/voxcity.egg-info/SOURCES.txt +0 -50
- {voxcity-0.3.11 → voxcity-0.3.13}/AUTHORS.rst +0 -0
- {voxcity-0.3.11 → voxcity-0.3.13}/CONTRIBUTING.rst +0 -0
- {voxcity-0.3.11 → voxcity-0.3.13}/HISTORY.rst +0 -0
- {voxcity-0.3.11 → voxcity-0.3.13}/LICENSE +0 -0
- {voxcity-0.3.11 → voxcity-0.3.13}/MANIFEST.in +0 -0
- {voxcity-0.3.11 → voxcity-0.3.13}/docs/Makefile +0 -0
- {voxcity-0.3.11 → voxcity-0.3.13}/docs/archive/README.rst +0 -0
- {voxcity-0.3.11 → voxcity-0.3.13}/docs/authors.rst +0 -0
- {voxcity-0.3.11 → voxcity-0.3.13}/docs/conf.py +0 -0
- {voxcity-0.3.11 → voxcity-0.3.13}/docs/index.rst +0 -0
- {voxcity-0.3.11 → voxcity-0.3.13}/docs/make.bat +0 -0
- {voxcity-0.3.11 → voxcity-0.3.13}/setup.cfg +0 -0
- {voxcity-0.3.11/src/voxcity/download → voxcity-0.3.13/src/voxcity/downloader}/__init__.py +0 -0
- {voxcity-0.3.11/src/voxcity/download → voxcity-0.3.13/src/voxcity/downloader}/gee.py +0 -0
- {voxcity-0.3.11/src/voxcity/download → voxcity-0.3.13/src/voxcity/downloader}/oemj.py +0 -0
- {voxcity-0.3.11/src/voxcity/download → voxcity-0.3.13/src/voxcity/downloader}/omt.py +0 -0
- {voxcity-0.3.11/src/voxcity/download → voxcity-0.3.13/src/voxcity/downloader}/osm.py +0 -0
- {voxcity-0.3.11/src/voxcity/download → voxcity-0.3.13/src/voxcity/downloader}/overture.py +0 -0
- {voxcity-0.3.11/src/voxcity/download → voxcity-0.3.13/src/voxcity/downloader}/utils.py +0 -0
- {voxcity-0.3.11/src/voxcity/file → voxcity-0.3.13/src/voxcity/exporter}/__init_.py +0 -0
- {voxcity-0.3.11/src/voxcity/file → voxcity-0.3.13/src/voxcity/exporter}/magicavoxel.py +0 -0
- {voxcity-0.3.11/src/voxcity/file → voxcity-0.3.13/src/voxcity/exporter}/obj.py +0 -0
- {voxcity-0.3.11/src/voxcity/geo → voxcity-0.3.13/src/voxcity/geoprocessor}/utils.py +0 -0
- {voxcity-0.3.11/src/voxcity/sim → voxcity-0.3.13/src/voxcity/simulator}/__init_.py +0 -0
- {voxcity-0.3.11/src/voxcity/sim → voxcity-0.3.13/src/voxcity/simulator}/utils.py +0 -0
- {voxcity-0.3.11 → voxcity-0.3.13}/src/voxcity/utils/__init_.py +0 -0
- {voxcity-0.3.11 → voxcity-0.3.13}/src/voxcity/utils/lc.py +0 -0
- {voxcity-0.3.11 → voxcity-0.3.13}/src/voxcity/utils/material.py +0 -0
- {voxcity-0.3.11 → voxcity-0.3.13}/src/voxcity/utils/weather.py +0 -0
- {voxcity-0.3.11 → voxcity-0.3.13}/src/voxcity.egg-info/dependency_links.txt +0 -0
- {voxcity-0.3.11 → voxcity-0.3.13}/src/voxcity.egg-info/requires.txt +0 -0
- {voxcity-0.3.11 → voxcity-0.3.13}/src/voxcity.egg-info/top_level.txt +0 -0
- {voxcity-0.3.11 → voxcity-0.3.13}/tests/__init__.py +0 -0
- {voxcity-0.3.11 → voxcity-0.3.13}/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.13
|
|
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>
|
|
@@ -458,7 +458,7 @@ G, edge_gdf = get_network_values(
|
|
|
458
458
|
| Dataset | Spatial Coverage | Source/Data Acquisition |
|
|
459
459
|
|---------|------------------|------------------------|
|
|
460
460
|
| [OpenStreetMap](https://www.openstreetmap.org) | Worldwide (24% completeness in city centers) | Volunteered / updated continuously |
|
|
461
|
-
| [
|
|
461
|
+
| [Microsoft Building Footprints](https://github.com/microsoft/GlobalMLBuildingFootprints) | North America, Europe, Australia | Prediction from satellite or aerial imagery / 2018-2019 for majority of the input imagery |
|
|
462
462
|
| [Open Buildings 2.5D Temporal Dataset](https://sites.research.google/gr/open-buildings/temporal/) | Africa, Latin America, and South and Southeast Asia | Prediction from satellite imagery / 2016-2023 |
|
|
463
463
|
| [EUBUCCO v0.1](https://eubucco.com/) | 27 EU countries and Switzerland (378 regions and 40,829 cities) | OpenStreetMap, government datasets / 2003-2021 (majority is after 2019) |
|
|
464
464
|
| [UT-GLOBUS](https://zenodo.org/records/11156602) | Worldwide (more than 1200 cities or locales) | Prediction from building footprints, population, spaceborne nDSM / not provided |
|
|
@@ -400,7 +400,7 @@ G, edge_gdf = get_network_values(
|
|
|
400
400
|
| Dataset | Spatial Coverage | Source/Data Acquisition |
|
|
401
401
|
|---------|------------------|------------------------|
|
|
402
402
|
| [OpenStreetMap](https://www.openstreetmap.org) | Worldwide (24% completeness in city centers) | Volunteered / updated continuously |
|
|
403
|
-
| [
|
|
403
|
+
| [Microsoft Building Footprints](https://github.com/microsoft/GlobalMLBuildingFootprints) | North America, Europe, Australia | Prediction from satellite or aerial imagery / 2018-2019 for majority of the input imagery |
|
|
404
404
|
| [Open Buildings 2.5D Temporal Dataset](https://sites.research.google/gr/open-buildings/temporal/) | Africa, Latin America, and South and Southeast Asia | Prediction from satellite imagery / 2016-2023 |
|
|
405
405
|
| [EUBUCCO v0.1](https://eubucco.com/) | 27 EU countries and Switzerland (378 regions and 40,829 cities) | OpenStreetMap, government datasets / 2003-2021 (majority is after 2019) |
|
|
406
406
|
| [UT-GLOBUS](https://zenodo.org/records/11156602) | Worldwide (more than 1200 cities or locales) | Prediction from building footprints, population, spaceborne nDSM / not provided |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "voxcity"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.13"
|
|
4
4
|
requires-python = ">=3.10,<3.13"
|
|
5
5
|
classifiers = [
|
|
6
6
|
"Programming Language :: Python :: 3.10",
|
|
@@ -69,7 +69,7 @@ homepage = "https://github.com/kunifujiwara/voxcity"
|
|
|
69
69
|
|
|
70
70
|
[tool.setuptools]
|
|
71
71
|
package-dir = {"" = "src"}
|
|
72
|
-
packages = ["voxcity", "voxcity.
|
|
72
|
+
packages = ["voxcity", "voxcity.downloader", "voxcity.geoprocessor", "voxcity.exporter", "voxcity.simulator", "voxcity.utils"]
|
|
73
73
|
|
|
74
74
|
[tool.setuptools.package-data]
|
|
75
75
|
"*" = ["*.*"]
|
|
@@ -2,7 +2,7 @@ __author__ = """Kunihiko Fujiwara"""
|
|
|
2
2
|
__email__ = 'kunihiko@nus.edu.sg'
|
|
3
3
|
__version__ = '0.1.0'
|
|
4
4
|
|
|
5
|
-
from .
|
|
5
|
+
# from .generator import *
|
|
6
6
|
# from .download import mbfp
|
|
7
7
|
# # from .utils.draw import rotate_rectangle, draw_rectangle_map
|
|
8
8
|
# from .geo import draw, utils
|
|
@@ -18,7 +18,7 @@ from fiona.transform import transform_geom
|
|
|
18
18
|
import logging
|
|
19
19
|
import shapely
|
|
20
20
|
|
|
21
|
-
from ..
|
|
21
|
+
from ..geoprocessor.utils import get_country_name
|
|
22
22
|
|
|
23
23
|
# Dictionary mapping European countries to their EUBUCCO data download URLs
|
|
24
24
|
country_links = {
|
|
@@ -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
|
|
@@ -9,8 +9,8 @@ AI. It handles downloading quadkey-based data files and converting them to GeoJS
|
|
|
9
9
|
import pandas as pd
|
|
10
10
|
import os
|
|
11
11
|
from .utils import download_file
|
|
12
|
-
from ..
|
|
13
|
-
from ..
|
|
12
|
+
from ..geoprocessor.utils import tile_from_lat_lon, quadkey_to_tile
|
|
13
|
+
from ..geoprocessor.polygon import load_geojsons_from_multiple_gz, swap_coordinates
|
|
14
14
|
|
|
15
15
|
def get_geojson_links(output_dir):
|
|
16
16
|
"""Download and load the dataset links CSV file containing building footprint URLs.
|
|
@@ -2,8 +2,8 @@ import os
|
|
|
2
2
|
import numpy as np
|
|
3
3
|
import datetime
|
|
4
4
|
|
|
5
|
-
from ..
|
|
6
|
-
from ..
|
|
5
|
+
from ..geoprocessor.grid import apply_operation, translate_array, group_and_label_cells, process_grid
|
|
6
|
+
from ..geoprocessor.utils import get_city_country_name_from_rectangle, get_timezone_info
|
|
7
7
|
from ..utils.lc import convert_land_cover
|
|
8
8
|
|
|
9
9
|
def array_to_string(arr):
|
|
@@ -18,13 +18,13 @@ import numpy as np
|
|
|
18
18
|
import os
|
|
19
19
|
|
|
20
20
|
# Local application/library specific imports
|
|
21
|
-
from .
|
|
22
|
-
from .
|
|
23
|
-
from .
|
|
24
|
-
from .
|
|
25
|
-
from .
|
|
26
|
-
from .
|
|
27
|
-
from .
|
|
21
|
+
from .downloader.mbfp import get_mbfp_geojson
|
|
22
|
+
from .downloader.osm import load_geojsons_from_openstreetmap, load_land_cover_geojson_from_osm
|
|
23
|
+
from .downloader.oemj import save_oemj_as_geotiff
|
|
24
|
+
from .downloader.omt import load_geojsons_from_openmaptiles
|
|
25
|
+
from .downloader.eubucco import load_geojson_from_eubucco
|
|
26
|
+
from .downloader.overture import load_geojsons_from_overture
|
|
27
|
+
from .downloader.gee import (
|
|
28
28
|
initialize_earth_engine,
|
|
29
29
|
get_roi,
|
|
30
30
|
get_ee_image_collection,
|
|
@@ -36,7 +36,7 @@ from .download.gee import (
|
|
|
36
36
|
save_geotiff_dynamic_world_v1,
|
|
37
37
|
save_geotiff_open_buildings_temporal
|
|
38
38
|
)
|
|
39
|
-
from .
|
|
39
|
+
from .geoprocessor.grid import (
|
|
40
40
|
group_and_label_cells,
|
|
41
41
|
process_grid,
|
|
42
42
|
create_land_cover_grid_from_geotiff_polygon,
|
|
@@ -47,7 +47,7 @@ from .geo.grid import (
|
|
|
47
47
|
create_building_height_grid_from_open_building_temporal_polygon
|
|
48
48
|
)
|
|
49
49
|
from .utils.lc import convert_land_cover, convert_land_cover_array
|
|
50
|
-
from .
|
|
50
|
+
from .geoprocessor.polygon import get_geojson_from_gpkg, save_geojson
|
|
51
51
|
from .utils.visualization import (
|
|
52
52
|
get_land_cover_classes,
|
|
53
53
|
visualize_land_cover_grid,
|
|
@@ -7,9 +7,10 @@ from pyproj import Proj, transform
|
|
|
7
7
|
from ipyleaflet import Map, DrawControl, Rectangle, Polygon as LeafletPolygon
|
|
8
8
|
import ipyleaflet
|
|
9
9
|
from geopy import distance
|
|
10
|
-
from .utils import get_coordinates_from_cityname
|
|
11
10
|
import shapely.geometry as geom
|
|
12
11
|
|
|
12
|
+
from .utils import get_coordinates_from_cityname
|
|
13
|
+
|
|
13
14
|
def rotate_rectangle(m, rectangle_vertices, angle):
|
|
14
15
|
"""
|
|
15
16
|
Project rectangle to Mercator, rotate, and re-project to lat-lon.
|
|
@@ -21,7 +21,7 @@ from .utils import (
|
|
|
21
21
|
create_building_polygons,
|
|
22
22
|
convert_format_lat_lon
|
|
23
23
|
)
|
|
24
|
-
from ..
|
|
24
|
+
from ..geoprocessor.polygon import (
|
|
25
25
|
filter_buildings,
|
|
26
26
|
extract_building_heights_from_geotiff,
|
|
27
27
|
extract_building_heights_from_geojson,
|
|
@@ -32,7 +32,7 @@ from ..utils.lc import (
|
|
|
32
32
|
create_land_cover_polygons,
|
|
33
33
|
get_dominant_class,
|
|
34
34
|
)
|
|
35
|
-
from ..
|
|
35
|
+
from ..downloader.gee import (
|
|
36
36
|
get_roi,
|
|
37
37
|
save_geotiff_open_buildings_temporal
|
|
38
38
|
)
|
|
@@ -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
|
|
|
@@ -163,11 +165,6 @@ def get_network_values(
|
|
|
163
165
|
|
|
164
166
|
return G, edge_gdf
|
|
165
167
|
|
|
166
|
-
# -------------------------------------------------------------------
|
|
167
|
-
# Optionally import your DEM helper
|
|
168
|
-
# -------------------------------------------------------------------
|
|
169
|
-
from voxcity.geo.grid import grid_to_geodataframe
|
|
170
|
-
|
|
171
168
|
# -------------------------------------------------------------------
|
|
172
169
|
# 1) Functions for interpolation, parallelization, and slope
|
|
173
170
|
# -------------------------------------------------------------------
|
|
@@ -484,6 +481,17 @@ def analyze_network_slopes(
|
|
|
484
481
|
|
|
485
482
|
# 10) Visualization
|
|
486
483
|
if settings['vis_graph']:
|
|
484
|
+
# Create a Polygon from the rectangle vertices
|
|
485
|
+
rectangle_polygon = Polygon(rectangle_vertices)
|
|
486
|
+
|
|
487
|
+
# Convert the rectangle polygon to the same CRS as edge_gdf_web
|
|
488
|
+
rectangle_gdf = gpd.GeoDataFrame(index=[0], crs='epsg:4326', geometry=[rectangle_polygon])
|
|
489
|
+
rectangle_gdf_web = rectangle_gdf.to_crs(epsg=3857)
|
|
490
|
+
|
|
491
|
+
# Get the bounding box of the rectangle
|
|
492
|
+
minx, miny, maxx, maxy = rectangle_gdf_web.total_bounds
|
|
493
|
+
|
|
494
|
+
# Plot the edges
|
|
487
495
|
edge_gdf_web = edge_gdf.to_crs(epsg=3857)
|
|
488
496
|
fig, ax = plt.subplots(figsize=settings['fig_size'])
|
|
489
497
|
edge_gdf_web.plot(
|
|
@@ -497,9 +505,43 @@ def analyze_network_slopes(
|
|
|
497
505
|
alpha=settings['alpha'],
|
|
498
506
|
legend_kwds={'label': f"{value_name} (%)"}
|
|
499
507
|
)
|
|
500
|
-
|
|
508
|
+
|
|
509
|
+
# Add basemap with the same extent as the rectangle
|
|
510
|
+
ctx.add_basemap(
|
|
511
|
+
ax,
|
|
512
|
+
source=settings['basemap_style'],
|
|
513
|
+
zoom=settings['zoom'],
|
|
514
|
+
bounds=(minx, miny, maxx, maxy) # Explicitly set the bounds of the basemap
|
|
515
|
+
)
|
|
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
|
voxcity-0.3.11/src/voxcity/file/geojson.py → voxcity-0.3.13/src/voxcity/geoprocessor/polygon.py
RENAMED
|
@@ -20,7 +20,7 @@ import rasterio
|
|
|
20
20
|
from rasterio.mask import mask
|
|
21
21
|
import copy
|
|
22
22
|
|
|
23
|
-
from
|
|
23
|
+
from .utils import validate_polygon_coordinates
|
|
24
24
|
|
|
25
25
|
def filter_and_convert_gdf_to_geojson(gdf, rectangle_vertices):
|
|
26
26
|
"""
|
|
@@ -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
|
|
|
@@ -9,7 +9,7 @@ from astral.sun import elevation, azimuth
|
|
|
9
9
|
|
|
10
10
|
from .view import trace_ray_generic, compute_vi_map_generic, get_sky_view_factor_map
|
|
11
11
|
from ..utils.weather import get_nearest_epw_from_climate_onebuilding, read_epw_for_solar_simulation
|
|
12
|
-
from ..
|
|
12
|
+
from ..exporter.obj import grid_to_obj, export_obj
|
|
13
13
|
|
|
14
14
|
@njit(parallel=True)
|
|
15
15
|
def compute_direct_solar_irradiance_map_binary(voxel_data, sun_direction, view_point_height, hit_values, meshsize, tree_k, tree_lad, inclusion_mode):
|
|
@@ -46,8 +46,8 @@ import matplotlib.pyplot as plt
|
|
|
46
46
|
import matplotlib.patches as mpatches
|
|
47
47
|
from numba import njit, prange
|
|
48
48
|
|
|
49
|
-
from ..
|
|
50
|
-
from ..
|
|
49
|
+
from ..geoprocessor.polygon import find_building_containing_point, get_buildings_in_drawn_polygon
|
|
50
|
+
from ..exporter.obj import grid_to_obj, export_obj
|
|
51
51
|
|
|
52
52
|
@njit
|
|
53
53
|
def calculate_transmittance(length, tree_k=0.6, tree_lad=1.0):
|
|
@@ -19,14 +19,14 @@ import math
|
|
|
19
19
|
|
|
20
20
|
from .lc import get_land_cover_classes
|
|
21
21
|
# from ..geo.geojson import filter_buildings
|
|
22
|
-
from ..
|
|
22
|
+
from ..geoprocessor.grid import (
|
|
23
23
|
calculate_grid_size,
|
|
24
24
|
create_coordinate_mesh,
|
|
25
25
|
create_cell_polygon,
|
|
26
26
|
grid_to_geodataframe
|
|
27
27
|
)
|
|
28
28
|
|
|
29
|
-
from ..
|
|
29
|
+
from ..geoprocessor.utils import (
|
|
30
30
|
initialize_geod,
|
|
31
31
|
calculate_distance,
|
|
32
32
|
normalize_to_one_meter,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: voxcity
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.13
|
|
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>
|
|
@@ -458,7 +458,7 @@ G, edge_gdf = get_network_values(
|
|
|
458
458
|
| Dataset | Spatial Coverage | Source/Data Acquisition |
|
|
459
459
|
|---------|------------------|------------------------|
|
|
460
460
|
| [OpenStreetMap](https://www.openstreetmap.org) | Worldwide (24% completeness in city centers) | Volunteered / updated continuously |
|
|
461
|
-
| [
|
|
461
|
+
| [Microsoft Building Footprints](https://github.com/microsoft/GlobalMLBuildingFootprints) | North America, Europe, Australia | Prediction from satellite or aerial imagery / 2018-2019 for majority of the input imagery |
|
|
462
462
|
| [Open Buildings 2.5D Temporal Dataset](https://sites.research.google/gr/open-buildings/temporal/) | Africa, Latin America, and South and Southeast Asia | Prediction from satellite imagery / 2016-2023 |
|
|
463
463
|
| [EUBUCCO v0.1](https://eubucco.com/) | 27 EU countries and Switzerland (378 regions and 40,829 cities) | OpenStreetMap, government datasets / 2003-2021 (majority is after 2019) |
|
|
464
464
|
| [UT-GLOBUS](https://zenodo.org/records/11156602) | Worldwide (more than 1200 cities or locales) | Prediction from building footprints, population, spaceborne nDSM / not provided |
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
AUTHORS.rst
|
|
2
|
+
CONTRIBUTING.rst
|
|
3
|
+
HISTORY.rst
|
|
4
|
+
LICENSE
|
|
5
|
+
MANIFEST.in
|
|
6
|
+
README.md
|
|
7
|
+
pyproject.toml
|
|
8
|
+
docs/Makefile
|
|
9
|
+
docs/authors.rst
|
|
10
|
+
docs/conf.py
|
|
11
|
+
docs/index.rst
|
|
12
|
+
docs/make.bat
|
|
13
|
+
docs/archive/README.rst
|
|
14
|
+
src/voxcity/__init__.py
|
|
15
|
+
src/voxcity/generator.py
|
|
16
|
+
src/voxcity.egg-info/PKG-INFO
|
|
17
|
+
src/voxcity.egg-info/SOURCES.txt
|
|
18
|
+
src/voxcity.egg-info/dependency_links.txt
|
|
19
|
+
src/voxcity.egg-info/requires.txt
|
|
20
|
+
src/voxcity.egg-info/top_level.txt
|
|
21
|
+
src/voxcity/downloader/__init__.py
|
|
22
|
+
src/voxcity/downloader/eubucco.py
|
|
23
|
+
src/voxcity/downloader/gee.py
|
|
24
|
+
src/voxcity/downloader/mbfp.py
|
|
25
|
+
src/voxcity/downloader/oemj.py
|
|
26
|
+
src/voxcity/downloader/omt.py
|
|
27
|
+
src/voxcity/downloader/osm.py
|
|
28
|
+
src/voxcity/downloader/overture.py
|
|
29
|
+
src/voxcity/downloader/utils.py
|
|
30
|
+
src/voxcity/exporter/__init_.py
|
|
31
|
+
src/voxcity/exporter/envimet.py
|
|
32
|
+
src/voxcity/exporter/magicavoxel.py
|
|
33
|
+
src/voxcity/exporter/obj.py
|
|
34
|
+
src/voxcity/geoprocessor/__init_.py
|
|
35
|
+
src/voxcity/geoprocessor/draw.py
|
|
36
|
+
src/voxcity/geoprocessor/grid.py
|
|
37
|
+
src/voxcity/geoprocessor/network.py
|
|
38
|
+
src/voxcity/geoprocessor/polygon.py
|
|
39
|
+
src/voxcity/geoprocessor/utils.py
|
|
40
|
+
src/voxcity/simulator/__init_.py
|
|
41
|
+
src/voxcity/simulator/solar.py
|
|
42
|
+
src/voxcity/simulator/utils.py
|
|
43
|
+
src/voxcity/simulator/view.py
|
|
44
|
+
src/voxcity/utils/__init_.py
|
|
45
|
+
src/voxcity/utils/lc.py
|
|
46
|
+
src/voxcity/utils/material.py
|
|
47
|
+
src/voxcity/utils/visualization.py
|
|
48
|
+
src/voxcity/utils/weather.py
|
|
49
|
+
tests/__init__.py
|
|
50
|
+
tests/voxelcity.py
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
AUTHORS.rst
|
|
2
|
-
CONTRIBUTING.rst
|
|
3
|
-
HISTORY.rst
|
|
4
|
-
LICENSE
|
|
5
|
-
MANIFEST.in
|
|
6
|
-
README.md
|
|
7
|
-
pyproject.toml
|
|
8
|
-
docs/Makefile
|
|
9
|
-
docs/authors.rst
|
|
10
|
-
docs/conf.py
|
|
11
|
-
docs/index.rst
|
|
12
|
-
docs/make.bat
|
|
13
|
-
docs/archive/README.rst
|
|
14
|
-
src/voxcity/__init__.py
|
|
15
|
-
src/voxcity/voxcity.py
|
|
16
|
-
src/voxcity.egg-info/PKG-INFO
|
|
17
|
-
src/voxcity.egg-info/SOURCES.txt
|
|
18
|
-
src/voxcity.egg-info/dependency_links.txt
|
|
19
|
-
src/voxcity.egg-info/requires.txt
|
|
20
|
-
src/voxcity.egg-info/top_level.txt
|
|
21
|
-
src/voxcity/download/__init__.py
|
|
22
|
-
src/voxcity/download/eubucco.py
|
|
23
|
-
src/voxcity/download/gee.py
|
|
24
|
-
src/voxcity/download/mbfp.py
|
|
25
|
-
src/voxcity/download/oemj.py
|
|
26
|
-
src/voxcity/download/omt.py
|
|
27
|
-
src/voxcity/download/osm.py
|
|
28
|
-
src/voxcity/download/overture.py
|
|
29
|
-
src/voxcity/download/utils.py
|
|
30
|
-
src/voxcity/file/__init_.py
|
|
31
|
-
src/voxcity/file/envimet.py
|
|
32
|
-
src/voxcity/file/geojson.py
|
|
33
|
-
src/voxcity/file/magicavoxel.py
|
|
34
|
-
src/voxcity/file/obj.py
|
|
35
|
-
src/voxcity/geo/__init_.py
|
|
36
|
-
src/voxcity/geo/draw.py
|
|
37
|
-
src/voxcity/geo/grid.py
|
|
38
|
-
src/voxcity/geo/network.py
|
|
39
|
-
src/voxcity/geo/utils.py
|
|
40
|
-
src/voxcity/sim/__init_.py
|
|
41
|
-
src/voxcity/sim/solar.py
|
|
42
|
-
src/voxcity/sim/utils.py
|
|
43
|
-
src/voxcity/sim/view.py
|
|
44
|
-
src/voxcity/utils/__init_.py
|
|
45
|
-
src/voxcity/utils/lc.py
|
|
46
|
-
src/voxcity/utils/material.py
|
|
47
|
-
src/voxcity/utils/visualization.py
|
|
48
|
-
src/voxcity/utils/weather.py
|
|
49
|
-
tests/__init__.py
|
|
50
|
-
tests/voxelcity.py
|
|
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
|