voxcity 0.6.15__py3-none-any.whl → 0.7.0__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.
- voxcity/__init__.py +14 -8
- voxcity/downloader/__init__.py +2 -1
- voxcity/downloader/citygml.py +32 -18
- voxcity/downloader/gba.py +210 -0
- voxcity/downloader/gee.py +5 -1
- voxcity/downloader/mbfp.py +1 -1
- voxcity/downloader/oemj.py +80 -8
- voxcity/downloader/osm.py +23 -7
- voxcity/downloader/overture.py +26 -1
- voxcity/downloader/utils.py +73 -73
- voxcity/errors.py +30 -0
- voxcity/exporter/__init__.py +13 -4
- voxcity/exporter/cityles.py +633 -535
- voxcity/exporter/envimet.py +728 -708
- voxcity/exporter/magicavoxel.py +334 -297
- voxcity/exporter/netcdf.py +238 -0
- voxcity/exporter/obj.py +1481 -655
- voxcity/generator/__init__.py +44 -0
- voxcity/generator/api.py +675 -0
- voxcity/generator/grids.py +379 -0
- voxcity/generator/io.py +94 -0
- voxcity/generator/pipeline.py +282 -0
- voxcity/generator/voxelizer.py +380 -0
- voxcity/geoprocessor/__init__.py +75 -6
- voxcity/geoprocessor/conversion.py +153 -0
- voxcity/geoprocessor/draw.py +62 -12
- voxcity/geoprocessor/heights.py +199 -0
- voxcity/geoprocessor/io.py +101 -0
- voxcity/geoprocessor/merge_utils.py +91 -0
- voxcity/geoprocessor/mesh.py +806 -790
- voxcity/geoprocessor/network.py +708 -679
- voxcity/geoprocessor/overlap.py +84 -0
- voxcity/geoprocessor/raster/__init__.py +82 -0
- voxcity/geoprocessor/raster/buildings.py +428 -0
- voxcity/geoprocessor/raster/canopy.py +258 -0
- voxcity/geoprocessor/raster/core.py +150 -0
- voxcity/geoprocessor/raster/export.py +93 -0
- voxcity/geoprocessor/raster/landcover.py +156 -0
- voxcity/geoprocessor/raster/raster.py +110 -0
- voxcity/geoprocessor/selection.py +85 -0
- voxcity/geoprocessor/utils.py +18 -14
- voxcity/models.py +113 -0
- voxcity/simulator/common/__init__.py +22 -0
- voxcity/simulator/common/geometry.py +98 -0
- voxcity/simulator/common/raytracing.py +450 -0
- voxcity/simulator/solar/__init__.py +43 -0
- voxcity/simulator/solar/integration.py +336 -0
- voxcity/simulator/solar/kernels.py +62 -0
- voxcity/simulator/solar/radiation.py +648 -0
- voxcity/simulator/solar/temporal.py +434 -0
- voxcity/simulator/view.py +36 -2286
- voxcity/simulator/visibility/__init__.py +29 -0
- voxcity/simulator/visibility/landmark.py +392 -0
- voxcity/simulator/visibility/view.py +508 -0
- voxcity/utils/logging.py +61 -0
- voxcity/utils/orientation.py +51 -0
- voxcity/utils/weather/__init__.py +26 -0
- voxcity/utils/weather/epw.py +146 -0
- voxcity/utils/weather/files.py +36 -0
- voxcity/utils/weather/onebuilding.py +486 -0
- voxcity/visualizer/__init__.py +24 -0
- voxcity/visualizer/builder.py +43 -0
- voxcity/visualizer/grids.py +141 -0
- voxcity/visualizer/maps.py +187 -0
- voxcity/visualizer/palette.py +228 -0
- voxcity/visualizer/renderer.py +928 -0
- {voxcity-0.6.15.dist-info → voxcity-0.7.0.dist-info}/METADATA +113 -36
- voxcity-0.7.0.dist-info/RECORD +77 -0
- {voxcity-0.6.15.dist-info → voxcity-0.7.0.dist-info}/WHEEL +1 -1
- voxcity/generator.py +0 -1137
- voxcity/geoprocessor/grid.py +0 -1568
- voxcity/geoprocessor/polygon.py +0 -1344
- voxcity/simulator/solar.py +0 -2329
- voxcity/utils/visualization.py +0 -2660
- voxcity/utils/weather.py +0 -817
- voxcity-0.6.15.dist-info/RECORD +0 -37
- {voxcity-0.6.15.dist-info → voxcity-0.7.0.dist-info/licenses}/AUTHORS.rst +0 -0
- {voxcity-0.6.15.dist-info → voxcity-0.7.0.dist-info/licenses}/LICENSE +0 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: voxcity
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
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
|
License: MIT
|
|
6
|
+
License-File: AUTHORS.rst
|
|
7
|
+
License-File: LICENSE
|
|
6
8
|
Author: Kunihiko Fujiwara
|
|
7
9
|
Author-email: fujiwara.kunihiko@takenaka.co.jp
|
|
8
10
|
Maintainer: Kunihiko Fujiwara
|
|
@@ -27,6 +29,7 @@ Requires-Dist: ipyleaflet
|
|
|
27
29
|
Requires-Dist: joblib
|
|
28
30
|
Requires-Dist: lxml
|
|
29
31
|
Requires-Dist: matplotlib
|
|
32
|
+
Requires-Dist: netCDF4
|
|
30
33
|
Requires-Dist: numba
|
|
31
34
|
Requires-Dist: numpy
|
|
32
35
|
Requires-Dist: osmnx
|
|
@@ -51,6 +54,7 @@ Requires-Dist: timezonefinder
|
|
|
51
54
|
Requires-Dist: tqdm
|
|
52
55
|
Requires-Dist: trimesh
|
|
53
56
|
Requires-Dist: typer
|
|
57
|
+
Requires-Dist: xarray
|
|
54
58
|
Project-URL: bugs, https://github.com/kunifujiwara/voxcity/issues
|
|
55
59
|
Project-URL: changelog, https://github.com/kunifujiwara/voxcity/blob/master/changelog.md
|
|
56
60
|
Project-URL: homepage, https://github.com/kunifujiwara/voxcity
|
|
@@ -65,13 +69,15 @@ Description-Content-Type: text/markdown
|
|
|
65
69
|
<!-- [](https://creativecommons.org/licenses/by-sa/4.0/) -->
|
|
66
70
|
|
|
67
71
|
<p align="center">
|
|
68
|
-
Tutorial preview: <a href="https://colab.research.google.com/drive/1Lofd3RawKMr6QuUsamGaF48u2MN0hfrP?usp=sharing">[Google Colab]</a> | Documentation: <a href="https://voxcity.readthedocs.io/en/latest">[Read the Docs]</a>
|
|
72
|
+
Tutorial preview: <a href="https://colab.research.google.com/drive/1Lofd3RawKMr6QuUsamGaF48u2MN0hfrP?usp=sharing">[Google Colab]</a> | Documentation: <a href="https://voxcity.readthedocs.io/en/latest">[Read the Docs]</a> | Video tutorial: <a href="https://youtu.be/qHusvKB07qk">[Watch on YouTube]</a>
|
|
69
73
|
</p>
|
|
70
74
|
|
|
71
75
|
<p align="center">
|
|
72
76
|
<img src="https://raw.githubusercontent.com/kunifujiwara/VoxCity/main/images/logo.png" alt="Voxcity logo" width="550">
|
|
73
77
|
</p>
|
|
74
78
|
|
|
79
|
+
|
|
80
|
+
|
|
75
81
|
# VoxCity
|
|
76
82
|
|
|
77
83
|
**voxcity** is a Python package that provides a seamless solution for grid-based 3D city model generation and urban simulation for cities worldwide. VoxCity's generator module automatically downloads building heights, tree canopy heights, land cover, and terrain elevation within a specified target area, and voxelizes buildings, trees, land cover, and terrain to generate an integrated voxel city model. The simulator module enables users to conduct environmental simulations, including solar radiation and view index analyses. Users can export the generated models using several file formats compatible with external software, such as ENVI-met (INX), Blender, and Rhino (OBJ). Try it out using the [Google Colab Demo](https://colab.research.google.com/drive/1Lofd3RawKMr6QuUsamGaF48u2MN0hfrP?usp=sharing) or your local environment. For detailed documentation, API reference, and tutorials, visit our [Read the Docs](https://voxcity.readthedocs.io/en/latest) page.
|
|
@@ -86,6 +92,21 @@ Description-Content-Type: text/markdown
|
|
|
86
92
|
<img src="https://raw.githubusercontent.com/kunifujiwara/VoxCity/main/images/concept.png" alt="Conceptual Diagram of voxcity" width="800">
|
|
87
93
|
</p>
|
|
88
94
|
|
|
95
|
+
## Tutorial
|
|
96
|
+
|
|
97
|
+
- **Google Colab (interactive notebook)**: <a href="https://colab.research.google.com/drive/1Lofd3RawKMr6QuUsamGaF48u2MN0hfrP?usp=sharing">Open tutorial in Colab</a>
|
|
98
|
+
- **YouTube video (walkthrough)**: <a href="https://youtu.be/qHusvKB07qk">Watch on YouTube</a>
|
|
99
|
+
|
|
100
|
+
<p align="center">
|
|
101
|
+
<a href="https://youtu.be/qHusvKB07qk" title="Click to watch the VoxCity tutorial on YouTube">
|
|
102
|
+
<img src="images/youtube_thumbnail_play.png" alt="VoxCity Tutorial — Click to watch on YouTube" width="480">
|
|
103
|
+
</a>
|
|
104
|
+
</p>
|
|
105
|
+
|
|
106
|
+
<p align="center">
|
|
107
|
+
<em>Tutorial video by <a href="https://ual.sg/author/liang-xiucheng/">Xiucheng Liang</a></em>
|
|
108
|
+
</p>
|
|
109
|
+
|
|
89
110
|
|
|
90
111
|
## Key Features
|
|
91
112
|
|
|
@@ -125,7 +146,7 @@ Make sure you have Python 3.12 installed. Install voxcity with:
|
|
|
125
146
|
```bash
|
|
126
147
|
conda create --name voxcity python=3.12
|
|
127
148
|
conda activate voxcity
|
|
128
|
-
conda install -c conda-forge gdal
|
|
149
|
+
conda install -c conda-forge gdal timezonefinder
|
|
129
150
|
pip install voxcity
|
|
130
151
|
```
|
|
131
152
|
|
|
@@ -165,6 +186,22 @@ ee.Authenticate()
|
|
|
165
186
|
ee.Initialize(project='your-project-id')
|
|
166
187
|
```
|
|
167
188
|
|
|
189
|
+
## Grid Orientation
|
|
190
|
+
|
|
191
|
+
- Canonical internal orientation is north_up: row 0 = north/top, last row = south/bottom for all 2D grids.
|
|
192
|
+
- Columns increase eastward: col 0 = west/left, indices increase to the east.
|
|
193
|
+
- Processing functions accept and return north_up/eastward grids. Visualization utilities may flip vertically only for display; they never change east–west.
|
|
194
|
+
- 3D indexing uses (row, col, z) = (north→south, west→east, ground→up).
|
|
195
|
+
- If your input data uses a south_up convention, normalize it at the boundary using:
|
|
196
|
+
|
|
197
|
+
```python
|
|
198
|
+
from voxcity.utils.orientation import ensure_orientation, ORIENTATION_SOUTH_UP
|
|
199
|
+
|
|
200
|
+
grid_north_up = ensure_orientation(grid, orientation_in=ORIENTATION_SOUTH_UP)
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
This keeps orientation handling explicit and avoids surprises.
|
|
204
|
+
|
|
168
205
|
### 2. Define Target Area
|
|
169
206
|
|
|
170
207
|
You can define your target area in three ways:
|
|
@@ -209,15 +246,12 @@ m
|
|
|
209
246
|
|
|
210
247
|
### 3. Set Parameters
|
|
211
248
|
|
|
212
|
-
Define
|
|
249
|
+
Define mesh size (required) and optional data sources:
|
|
213
250
|
|
|
214
251
|
```python
|
|
215
|
-
|
|
216
|
-
land_cover_source = 'OpenStreetMap' # Land cover classification data source
|
|
217
|
-
canopy_height_source = 'High Resolution 1m Global Canopy Height Maps' # Tree canopy height data source
|
|
218
|
-
dem_source = 'DeltaDTM' # Digital elevation model data source
|
|
219
|
-
meshsize = 5 # Grid cell size in meters
|
|
252
|
+
meshsize = 5 # Grid cell size in meters (required)
|
|
220
253
|
|
|
254
|
+
# Optional: Specify output directory and other settings
|
|
221
255
|
kwargs = {
|
|
222
256
|
"output_dir": "output", # Directory to save output files
|
|
223
257
|
"dem_interpolation": True # Enable DEM interpolation
|
|
@@ -226,24 +260,67 @@ kwargs = {
|
|
|
226
260
|
|
|
227
261
|
### 4. Get voxcity Output
|
|
228
262
|
|
|
229
|
-
Generate voxel data grids and corresponding building
|
|
263
|
+
Generate voxel data grids and a corresponding building GeoDataFrame.
|
|
264
|
+
|
|
265
|
+
#### Option 1: Automatic Mode (Recommended)
|
|
266
|
+
Data sources are automatically selected based on location:
|
|
230
267
|
|
|
231
268
|
```python
|
|
232
269
|
from voxcity.generator import get_voxcity
|
|
233
270
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
building_gdf = get_voxcity(
|
|
271
|
+
# Auto mode: all data sources selected automatically based on location
|
|
272
|
+
voxcity = get_voxcity(
|
|
237
273
|
rectangle_vertices,
|
|
238
|
-
building_source,
|
|
239
|
-
land_cover_source,
|
|
240
|
-
canopy_height_source,
|
|
241
|
-
dem_source,
|
|
242
274
|
meshsize,
|
|
243
275
|
**kwargs
|
|
244
276
|
)
|
|
277
|
+
|
|
278
|
+
# Access the generated grids and GeoDataFrame
|
|
279
|
+
voxcity_grid = voxcity.voxels.classes
|
|
280
|
+
building_height_grid = voxcity.buildings.heights
|
|
281
|
+
building_min_height_grid = voxcity.buildings.min_heights
|
|
282
|
+
building_id_grid = voxcity.buildings.ids
|
|
283
|
+
canopy_height_grid = voxcity.tree_canopy.top
|
|
284
|
+
canopy_bottom_height_grid = voxcity.tree_canopy.bottom
|
|
285
|
+
land_cover_grid = voxcity.land_cover.classes
|
|
286
|
+
dem_grid = voxcity.dem.elevation
|
|
287
|
+
building_gdf = voxcity.extras.get('building_gdf')
|
|
245
288
|
```
|
|
246
289
|
|
|
290
|
+
#### Option 2: Custom Mode
|
|
291
|
+
Specify data sources explicitly:
|
|
292
|
+
|
|
293
|
+
```python
|
|
294
|
+
# Custom mode: specify all data sources
|
|
295
|
+
voxcity = get_voxcity(
|
|
296
|
+
rectangle_vertices,
|
|
297
|
+
meshsize,
|
|
298
|
+
building_source='OpenStreetMap',
|
|
299
|
+
land_cover_source='OpenStreetMap',
|
|
300
|
+
canopy_height_source='High Resolution 1m Global Canopy Height Maps',
|
|
301
|
+
dem_source='DeltaDTM',
|
|
302
|
+
**kwargs
|
|
303
|
+
)
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
#### Option 3: Hybrid Mode
|
|
307
|
+
Specify some sources, auto-select others:
|
|
308
|
+
|
|
309
|
+
```python
|
|
310
|
+
# Hybrid mode: specify building source, auto-select others
|
|
311
|
+
voxcity = get_voxcity(
|
|
312
|
+
rectangle_vertices,
|
|
313
|
+
meshsize,
|
|
314
|
+
building_source='Overture', # Custom
|
|
315
|
+
# land_cover_source, canopy_height_source, dem_source auto-selected
|
|
316
|
+
**kwargs
|
|
317
|
+
)
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### Interactive 3D Demo (Plotly)
|
|
321
|
+
|
|
322
|
+
- **Open interactive demo**: <a href="https://voxcity.readthedocs.io/en/latest/_static/plotly/voxcity_demo.html">Launch the Plotly 3D viewer</a>
|
|
323
|
+
|
|
247
324
|
### 5. Exporting Files
|
|
248
325
|
|
|
249
326
|
#### ENVI-MET INX/EDB Files:
|
|
@@ -263,7 +340,11 @@ envimet_kwargs = {
|
|
|
263
340
|
"lad": 1.0 # Leaf Area Density (m2/m3) for vegetation modeling
|
|
264
341
|
}
|
|
265
342
|
|
|
266
|
-
|
|
343
|
+
# If using auto mode, you can check selected sources in logs
|
|
344
|
+
# For custom mode, use your specified land_cover_source
|
|
345
|
+
land_cover_source = 'OpenStreetMap' # Specify if needed for export
|
|
346
|
+
|
|
347
|
+
export_inx(city.building_height_grid, city.building_id_grid, city.canopy_height_top, city.land_cover_grid, city.dem_grid, meshsize, land_cover_source, rectangle_vertices, **envimet_kwargs)
|
|
267
348
|
generate_edb_file(**envimet_kwargs)
|
|
268
349
|
```
|
|
269
350
|
<p align="center">
|
|
@@ -280,7 +361,8 @@ from voxcity.exporter.obj import export_obj
|
|
|
280
361
|
|
|
281
362
|
output_directory = "output" # Directory where output files will be saved
|
|
282
363
|
output_file_name = "voxcity" # Base name for the output OBJ file
|
|
283
|
-
export_obj(
|
|
364
|
+
# export_obj signature: export_obj(array, output_dir, file_name, voxel_size, voxel_color_map=None)
|
|
365
|
+
export_obj(city.voxcity_grid, output_directory, output_file_name, meshsize)
|
|
284
366
|
```
|
|
285
367
|
The generated OBJ files can be opened and rendered in the following 3D visualization software:
|
|
286
368
|
|
|
@@ -304,7 +386,7 @@ from voxcity.exporter.magicavoxel import export_magicavoxel_vox
|
|
|
304
386
|
|
|
305
387
|
output_path = "output"
|
|
306
388
|
base_filename = "voxcity"
|
|
307
|
-
export_magicavoxel_vox(voxcity_grid, output_path, base_filename=base_filename)
|
|
389
|
+
export_magicavoxel_vox(city.voxcity_grid, output_path, base_filename=base_filename)
|
|
308
390
|
```
|
|
309
391
|
<p align="center">
|
|
310
392
|
<img src="https://raw.githubusercontent.com/kunifujiwara/VoxCity/main/images/vox.png" alt="Generated 3D City Model on MagicaVoxel GUI" width="600">
|
|
@@ -322,13 +404,11 @@ from voxcity.simulator.solar import get_global_solar_irradiance_using_epw
|
|
|
322
404
|
|
|
323
405
|
solar_kwargs = {
|
|
324
406
|
"download_nearest_epw": True, # Whether to automatically download nearest EPW weather file based on location from Climate.OneBuilding.Org
|
|
325
|
-
"rectangle_vertices": rectangle_vertices, # Coordinates defining the area of interest for calculation
|
|
326
407
|
# "epw_file_path": "./output/new.york-downtown.manhattan.heli_ny_usa_1.epw", # Path to EnergyPlus Weather (EPW) file containing climate data. Set if you already have an EPW file.
|
|
327
408
|
"calc_time": "01-01 12:00:00", # Time for instantaneous calculation in format "MM-DD HH:MM:SS"
|
|
328
409
|
"view_point_height": 1.5, # Height of view point in meters for calculating solar access. Default: 1.5 m
|
|
329
410
|
"tree_k": 0.6, # Static extinction coefficient - controls how much sunlight is blocked by trees (higher = more blocking)
|
|
330
411
|
"tree_lad": 1.0, # Leaf area density of trees - density of leaves/branches that affect shading (higher = denser foliage)
|
|
331
|
-
"dem_grid": dem_grid, # Digital elevation model grid for terrain heights
|
|
332
412
|
"colormap": 'magma', # Matplotlib colormap for visualization. Default: 'viridis'
|
|
333
413
|
"obj_export": True, # Whether to export results as 3D OBJ file
|
|
334
414
|
"output_directory": 'output/test', # Directory for saving output files
|
|
@@ -339,9 +419,8 @@ solar_kwargs = {
|
|
|
339
419
|
}
|
|
340
420
|
|
|
341
421
|
# Compute global solar irradiance map (direct + diffuse radiation)
|
|
342
|
-
solar_grid = get_global_solar_irradiance_using_epw(
|
|
343
|
-
|
|
344
|
-
meshsize, # Size of each voxel in meters
|
|
422
|
+
solar_grid = get_global_solar_irradiance_using_epw(
|
|
423
|
+
voxcity, # VoxCity object containing voxel data and metadata
|
|
345
424
|
calc_type='instantaneous', # Calculate instantaneous irradiance at specified time
|
|
346
425
|
direct_normal_irradiance_scaling=1.0, # Scaling factor for direct solar radiation (1.0 = no scaling)
|
|
347
426
|
diffuse_irradiance_scaling=1.0, # Scaling factor for diffuse solar radiation (1.0 = no scaling)
|
|
@@ -351,12 +430,11 @@ solar_grid = get_global_solar_irradiance_using_epw(
|
|
|
351
430
|
# Adjust parameters for cumulative calculation
|
|
352
431
|
solar_kwargs["start_time"] = "01-01 01:00:00" # Start time for cumulative calculation
|
|
353
432
|
solar_kwargs["end_time"] = "01-31 23:00:00" # End time for cumulative calculation
|
|
354
|
-
solar_kwargs["output_file_name"] = '
|
|
433
|
+
solar_kwargs["output_file_name"] = 'cumulative_solar_irradiance' # Base filename for outputs (without extension)
|
|
355
434
|
|
|
356
435
|
# Calculate cumulative solar irradiance over the specified time period
|
|
357
|
-
cum_solar_grid = get_global_solar_irradiance_using_epw(
|
|
358
|
-
|
|
359
|
-
meshsize, # Size of each voxel in meters
|
|
436
|
+
cum_solar_grid = get_global_solar_irradiance_using_epw(
|
|
437
|
+
voxcity, # VoxCity object containing voxel data and metadata
|
|
360
438
|
calc_type='cumulative', # Calculate cumulative irradiance over time period instead of instantaneous
|
|
361
439
|
direct_normal_irradiance_scaling=1.0, # Scaling factor for direct solar radiation (1.0 = no scaling)
|
|
362
440
|
diffuse_irradiance_scaling=1.0, # Scaling factor for diffuse solar radiation (1.0 = no scaling)
|
|
@@ -378,7 +456,6 @@ from voxcity.simulator.view import get_view_index
|
|
|
378
456
|
|
|
379
457
|
view_kwargs = {
|
|
380
458
|
"view_point_height": 1.5, # Height of observer viewpoint in meters
|
|
381
|
-
"dem_grid": dem_grid, # Digital elevation model grid
|
|
382
459
|
"colormap": "viridis", # Colormap for visualization
|
|
383
460
|
"obj_export": True, # Whether to export as OBJ file
|
|
384
461
|
"output_directory": "output", # Directory to save output files
|
|
@@ -386,7 +463,7 @@ view_kwargs = {
|
|
|
386
463
|
}
|
|
387
464
|
|
|
388
465
|
# Compute Green View Index using mode='green'
|
|
389
|
-
gvi_grid = get_view_index(
|
|
466
|
+
gvi_grid = get_view_index(voxcity, mode='green', **view_kwargs)
|
|
390
467
|
|
|
391
468
|
# Adjust parameters for Sky View Index
|
|
392
469
|
view_kwargs["colormap"] = "BuPu_r"
|
|
@@ -394,7 +471,7 @@ view_kwargs["output_file_name"] = "svi"
|
|
|
394
471
|
view_kwargs["elevation_min_degrees"] = 0 # Start ray-tracing from the horizon
|
|
395
472
|
|
|
396
473
|
# Compute Sky View Index using mode='sky'
|
|
397
|
-
svi_grid = get_view_index(
|
|
474
|
+
svi_grid = get_view_index(voxcity, mode='sky', **view_kwargs)
|
|
398
475
|
```
|
|
399
476
|
<p align="center">
|
|
400
477
|
<img src="https://raw.githubusercontent.com/kunifujiwara/VoxCity/main/images/view_index.png" alt="View Index Maps Rendered in Rhino" width="800">
|
|
@@ -411,14 +488,12 @@ from voxcity.simulator.view import get_landmark_visibility_map
|
|
|
411
488
|
# Dictionary of parameters for landmark visibility analysis
|
|
412
489
|
landmark_kwargs = {
|
|
413
490
|
"view_point_height": 1.5, # Height of observer viewpoint in meters
|
|
414
|
-
"rectangle_vertices": rectangle_vertices, # Vertices defining simulation domain boundary
|
|
415
|
-
"dem_grid": dem_grid, # Digital elevation model grid
|
|
416
491
|
"colormap": "cool", # Colormap for visualization
|
|
417
492
|
"obj_export": True, # Whether to export as OBJ file
|
|
418
493
|
"output_directory": "output", # Directory to save output files
|
|
419
494
|
"output_file_name": "landmark_visibility" # Base filename for outputs
|
|
420
495
|
}
|
|
421
|
-
landmark_vis_map = get_landmark_visibility_map(
|
|
496
|
+
landmark_vis_map, _ = get_landmark_visibility_map(voxcity, voxcity.extras.get('building_gdf'), **landmark_kwargs)
|
|
422
497
|
```
|
|
423
498
|
<p align="center">
|
|
424
499
|
<img src="https://raw.githubusercontent.com/kunifujiwara/VoxCity/main/images/landmark.png" alt="Landmark Visibility Map Rendered in Rhino" width="500">
|
|
@@ -520,6 +595,8 @@ Fujiwara K, Tsurumi R, Kiyono T, Fan Z, Liang X, Lei B, Yap W, Ito K, Biljecki F
|
|
|
520
595
|
|
|
521
596
|
## Credit
|
|
522
597
|
|
|
598
|
+
- Tutorial video by <a href="https://ual.sg/author/liang-xiucheng/">Xiucheng Liang</a>
|
|
599
|
+
|
|
523
600
|
This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [`audreyr/cookiecutter-pypackage`](https://github.com/audreyr/cookiecutter-pypackage) project template.
|
|
524
601
|
|
|
525
602
|
--------------------------------------------------------------------------------
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
voxcity/__init__.py,sha256=wRuf9rZL_Z4Ac6jdfIE0mv5dpl4LYm3S5W87TwrXcrk,444
|
|
2
|
+
voxcity/downloader/__init__.py,sha256=1Y4YMHvKiDcJ4eC69XPbapg3-WhJ6yVXrX8-3d8Vi3g,171
|
|
3
|
+
voxcity/downloader/citygml.py,sha256=I8-wWijqVOA1VeH3nFP9ZlC3l6XvXfli6lB17ZIXHb0,42232
|
|
4
|
+
voxcity/downloader/eubucco.py,sha256=ln1YNaaOgJfxNfCtVbYaMm775-bUvpAA_LDv60_i22w,17875
|
|
5
|
+
voxcity/downloader/gba.py,sha256=b-VmlVS8IzCR0OYfWgtlMpuZrB5_0M4EpG8BEBj6YEY,7184
|
|
6
|
+
voxcity/downloader/gee.py,sha256=_dw0677n9t8ZJZflnM4Gfd3FQ2Y5sD-PYmilVu6xkTE,23757
|
|
7
|
+
voxcity/downloader/mbfp.py,sha256=yhKTXJOJZAWqdTBib9BO5meP50lzHAxI6sSYWCCSgNU,6590
|
|
8
|
+
voxcity/downloader/oemj.py,sha256=SeMId9MvI-DnGyREpqu5-6D-xwRdMJdYIGcAPFD95rw,16432
|
|
9
|
+
voxcity/downloader/osm.py,sha256=7Wo6lSodci7gALMKLQ_0ricmn0ZrfUK90vKYQ-ayU2A,46285
|
|
10
|
+
voxcity/downloader/overture.py,sha256=hVxu-3Fmuu2E1tEzcDcNyU1cR-aE-6h6jkcxkuqN1-s,13343
|
|
11
|
+
voxcity/downloader/utils.py,sha256=DAbPlj9i-OgJ8g4H0n_Dqfc-GalPTk0bsHkYMtja-yI,3026
|
|
12
|
+
voxcity/errors.py,sha256=pPd4FhkAqKKCp5Emdzelc4fPKf112yUrD68da5YO1Xc,747
|
|
13
|
+
voxcity/exporter/__init__.py,sha256=a-v_WeEHHYaqfZqgXfun7ExTh53KWKX8mTn6fQ4VL94,321
|
|
14
|
+
voxcity/exporter/cityles.py,sha256=yguHtwZKONlLeN-_hqlJaNtfGFbceEfYF-TjrRfNYzs,22145
|
|
15
|
+
voxcity/exporter/envimet.py,sha256=NhVeBP8tXGiaAFUk6JsV39Q8Shhxv1Yy9Xftc-9b9YQ,30934
|
|
16
|
+
voxcity/exporter/magicavoxel.py,sha256=G02mDN0JCjaLecf1q56kfMSHKaP4YYKNCwSSCwUR2bE,13829
|
|
17
|
+
voxcity/exporter/netcdf.py,sha256=m4eUBn8wfW6qFJOpXhqeeUQLxd9DVwmVHMCTRpNK1So,8305
|
|
18
|
+
voxcity/exporter/obj.py,sha256=7G3kbKaKjIZHnWUVgbNKyqZGxJxBJJ3_N28tGqI2sCg,61521
|
|
19
|
+
voxcity/generator/__init__.py,sha256=Rlm36dTDV3mPGCR_i0C-MhZoBFtgOyQ-4ZUBhamAn4w,1093
|
|
20
|
+
voxcity/generator/api.py,sha256=9gQuBRVsJ92Dh3AOCxA4QKYnUcufb0s7H1vEgwq0eis,33397
|
|
21
|
+
voxcity/generator/grids.py,sha256=7OqAtACdH2PwghTkipfiHM0xx0whcidwy49dKvpqhyA,19910
|
|
22
|
+
voxcity/generator/io.py,sha256=mJmmRFsaFq3VZYPEsi5TWjYWhNGob5y9PvfHRGsq49o,3163
|
|
23
|
+
voxcity/generator/pipeline.py,sha256=Qa_si0T5iTORTEK1PvAmMNWjazNAxvWBpWXxqBvt9nU,11609
|
|
24
|
+
voxcity/generator/voxelizer.py,sha256=uQTbRG8y_inNOvIyBGE4Nqh1aTk-lIFnkqMrBiDgXWw,15592
|
|
25
|
+
voxcity/geoprocessor/__init__.py,sha256=8DFBbSqds6fTEzJNm-IfPNW0xKghFoIJV47R_EhlNHw,1646
|
|
26
|
+
voxcity/geoprocessor/conversion.py,sha256=Bdf_SNqOhTqYW44MPLWx6-5iyVmZO2Yy1eZ6pDDgyvs,5007
|
|
27
|
+
voxcity/geoprocessor/draw.py,sha256=7RaA3CU9-PZ6crwU_VnAmPguK0tklZ-XvPeAtQMEzdY,51719
|
|
28
|
+
voxcity/geoprocessor/heights.py,sha256=cAksRWaLPFKhv9YsMybT0DCMyuE9WNajRXHpRFbSyN4,8636
|
|
29
|
+
voxcity/geoprocessor/io.py,sha256=iLoip3NXuyj7mk4xvRPMnouIVoR0swzIdrg6R08D68I,3427
|
|
30
|
+
voxcity/geoprocessor/merge_utils.py,sha256=5-hGvkijECYufHra2C-fSSZViEhgsdeg0EdfZIVtGCs,3068
|
|
31
|
+
voxcity/geoprocessor/mesh.py,sha256=zu5hWOs5rWXYNmKXpI7mFY3CJRud0qL8a1YulZBJdCs,32107
|
|
32
|
+
voxcity/geoprocessor/network.py,sha256=X84aJz9MqrN6pP1bEzCmpOXhz5RWS4di655rY1vQNO0,25932
|
|
33
|
+
voxcity/geoprocessor/overlap.py,sha256=taWkqtS79gL-QBClPboz8XzqARO5BwqaTA4iTHvkRfI,2783
|
|
34
|
+
voxcity/geoprocessor/raster/__init__.py,sha256=3f1qGOsM0kpfa7lw4k-uYqXwuN0Eaxp7WcWUcpgEtCs,2287
|
|
35
|
+
voxcity/geoprocessor/raster/buildings.py,sha256=po4ip8sIGwpb7FrG1IilGMpgWQ8XpsuLxjVC6YmVxjA,18845
|
|
36
|
+
voxcity/geoprocessor/raster/canopy.py,sha256=DvDB8mT_fY9NaJjanEbv1DCaR9Ceqjn0AIxqiHy4jbs,9668
|
|
37
|
+
voxcity/geoprocessor/raster/core.py,sha256=NcT-DRXnjacDYkR5k5FfsPbh4nw1NBGluQBXwO9Y4cM,5441
|
|
38
|
+
voxcity/geoprocessor/raster/export.py,sha256=eNsrD3IsS-DqK8aSp2MQz7c_a01YcOyPMRxScUMyVR0,3538
|
|
39
|
+
voxcity/geoprocessor/raster/landcover.py,sha256=JgLOI1drY2h6zAGAhYgrLK7ofq4vfGWIIWpUodQaORM,6313
|
|
40
|
+
voxcity/geoprocessor/raster/raster.py,sha256=KLo1Z4-cztX8GLJ-mwYlbPvn1BGCIH7QwfrJDtD3miI,4425
|
|
41
|
+
voxcity/geoprocessor/selection.py,sha256=NE2Z0Y1IJkBPB3dEvk0yzZoye9WWGjJVm9xj6m71ZiI,2672
|
|
42
|
+
voxcity/geoprocessor/utils.py,sha256=gnFxxN9LBwzRXprKuJdq-FGpJ18ztXL3lnwHJ9Ma7Sk,31574
|
|
43
|
+
voxcity/models.py,sha256=FRWpOQHCISOVQ2UUQiUNFCTn_-oSSA5pea21OOl_eB0,2783
|
|
44
|
+
voxcity/simulator/__init__.py,sha256=APdkcdaovj0v_RPOaA4SBvFUKT2RM7Hxuuz3Sux4gCo,65
|
|
45
|
+
voxcity/simulator/common/__init__.py,sha256=Yi5h8DtLFUB8T6TsmDeVxuafjcwzpRXXgsN5nmvJLJk,486
|
|
46
|
+
voxcity/simulator/common/geometry.py,sha256=Zb9nI6q7lPcnX5O9YC-yMwhvYw6QtqxZN468Ikh82yE,3414
|
|
47
|
+
voxcity/simulator/common/raytracing.py,sha256=j9QiI9NIzqkIm8MOipqJCJeFtPWPTYxeAh-wP_lkAek,16343
|
|
48
|
+
voxcity/simulator/solar/__init__.py,sha256=HkwRGMKmi3LvtziS2Ja8tJetBMqhGA4EoGujrQIn7HU,1256
|
|
49
|
+
voxcity/simulator/solar/integration.py,sha256=EtAbb139il6htXr1_R6wwqVof-I47TsJShwybuFJLa4,13531
|
|
50
|
+
voxcity/simulator/solar/kernels.py,sha256=SLglw8dyIYdG8eN65aQsqTd4PmEuX2tkdwXJgPZ3Y3Q,2158
|
|
51
|
+
voxcity/simulator/solar/radiation.py,sha256=woSTmiDEUrGMGJyDsWr3kWL5wISMUBZuqc0KdoYJblk,22576
|
|
52
|
+
voxcity/simulator/solar/temporal.py,sha256=exqf1U6pQbsiqjtvWcqqcOx-dQGlVOJfeOj22j3bmqU,17652
|
|
53
|
+
voxcity/simulator/utils.py,sha256=sEYBB2-hLJxTiXQps1_-Fi7t1HN3-1OPOvBCWtgIisA,130
|
|
54
|
+
voxcity/simulator/view.py,sha256=Shqn7rFhhzCEPYHTu8Wg-6uCZ8SNrPCODY4sYzk8MmI,1058
|
|
55
|
+
voxcity/simulator/visibility/__init__.py,sha256=mpBVeZO3IRJAcEX8fookdDgquBVKvzCRuNMNM4jrD_4,664
|
|
56
|
+
voxcity/simulator/visibility/landmark.py,sha256=E0bpivtjt9oJop0zsvWXE693o-RebU66H_EbLKlPDXk,17542
|
|
57
|
+
voxcity/simulator/visibility/view.py,sha256=w_zPmMxyHdwTURBowX-AhlvHEBjSCUsEpt865-eoBHE,21642
|
|
58
|
+
voxcity/utils/__init__.py,sha256=Q-NYCqYnAAaF80KuNwpqIjbE7Ec3Gr4y_khMLIMhJrg,68
|
|
59
|
+
voxcity/utils/lc.py,sha256=722Gz3lPbgAp0mmTZ-g-QKBbAnbxrcgaYwb1sa7q8Sk,16189
|
|
60
|
+
voxcity/utils/logging.py,sha256=BZGOSKrAh_aBrNgVD_jX5lJXAOc4wkTuB0R_fbp3DBU,1652
|
|
61
|
+
voxcity/utils/material.py,sha256=H8K8Lq4wBL6dQtgj7esUW2U6wLCOTeOtelkTDJoRgMo,10007
|
|
62
|
+
voxcity/utils/orientation.py,sha256=sVV2VipImBsijcJ8gw_uv1zbs4b95QoJf0qC0R39VPM,2014
|
|
63
|
+
voxcity/utils/weather/__init__.py,sha256=r8Qrybs1lSsFbi9_HRmEmi9oVLXSaYi_fBYk8UMZ_Tk,722
|
|
64
|
+
voxcity/utils/weather/epw.py,sha256=f2u7jzwYd7Kb5L7cCkyrBiKPN7iE5gk81luOXjAQRKM,5424
|
|
65
|
+
voxcity/utils/weather/files.py,sha256=ogbfCX-5wBF_fhb3pJa2-71yDT8SlV1JSqna-QwyIR0,987
|
|
66
|
+
voxcity/utils/weather/onebuilding.py,sha256=WWococ9NWU54_ATIy_59ZE_Wkfk8WkB2nAf3j-X5BFM,24695
|
|
67
|
+
voxcity/visualizer/__init__.py,sha256=NMj0IF7ckWoTs-WyWp4VWlzQqi0VdjmTq1_EnPGF-2E,957
|
|
68
|
+
voxcity/visualizer/builder.py,sha256=4vpfAZcpq844gNQBtYWucDl2oWyv5US18QTDfz18SvU,1368
|
|
69
|
+
voxcity/visualizer/grids.py,sha256=x02KiK6NbhvBK6qDlLWDBGqcz6TH8HHc7z_8j3Lgo7c,6849
|
|
70
|
+
voxcity/visualizer/maps.py,sha256=OeoEaYjCOgeveuTmEa62hFFVCXZzOo6JTZ3bv4Zxelo,8803
|
|
71
|
+
voxcity/visualizer/palette.py,sha256=ThZQlLwUSSfN516h9DyMry0CTYJVXeJDdL7oP41_zKg,7088
|
|
72
|
+
voxcity/visualizer/renderer.py,sha256=CdPmMW6EG6tLhYwPHNRTO-_trsgF8ZsIC6NQA2WMVuY,38363
|
|
73
|
+
voxcity-0.7.0.dist-info/licenses/AUTHORS.rst,sha256=m82vkI5QokEGdcHof2OxK39lf81w1P58kG9ZNNAKS9U,175
|
|
74
|
+
voxcity-0.7.0.dist-info/licenses/LICENSE,sha256=s_jE1Df1nTPL4A_5GCGic5Zwex0CVaPKcAmSilxJPPE,1089
|
|
75
|
+
voxcity-0.7.0.dist-info/METADATA,sha256=4bh9kbAtjLd_gh5EDfed7oz74MaAaSNyy_Qyb_X9oGA,28375
|
|
76
|
+
voxcity-0.7.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
77
|
+
voxcity-0.7.0.dist-info/RECORD,,
|