voxcity 0.6.26__py3-none-any.whl → 1.0.2__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 +10 -4
- voxcity/downloader/__init__.py +2 -1
- 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/utils.py +73 -73
- voxcity/errors.py +30 -0
- voxcity/exporter/__init__.py +9 -1
- voxcity/exporter/cityles.py +129 -34
- voxcity/exporter/envimet.py +51 -26
- voxcity/exporter/magicavoxel.py +42 -5
- voxcity/exporter/netcdf.py +27 -0
- voxcity/exporter/obj.py +103 -28
- voxcity/generator/__init__.py +47 -0
- voxcity/generator/api.py +721 -0
- voxcity/generator/grids.py +381 -0
- voxcity/generator/io.py +94 -0
- voxcity/generator/pipeline.py +282 -0
- voxcity/generator/update.py +429 -0
- voxcity/generator/voxelizer.py +392 -0
- voxcity/geoprocessor/__init__.py +75 -6
- voxcity/geoprocessor/conversion.py +153 -0
- voxcity/geoprocessor/draw.py +1488 -1169
- voxcity/geoprocessor/heights.py +199 -0
- voxcity/geoprocessor/io.py +101 -0
- voxcity/geoprocessor/merge_utils.py +91 -0
- voxcity/geoprocessor/mesh.py +26 -10
- voxcity/geoprocessor/network.py +35 -6
- voxcity/geoprocessor/overlap.py +84 -0
- voxcity/geoprocessor/raster/__init__.py +82 -0
- voxcity/geoprocessor/raster/buildings.py +435 -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 +159 -0
- voxcity/geoprocessor/raster/raster.py +110 -0
- voxcity/geoprocessor/selection.py +85 -0
- voxcity/geoprocessor/utils.py +824 -820
- 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 +66 -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/sky.py +668 -0
- voxcity/simulator/solar/temporal.py +792 -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/__init__.py +11 -0
- voxcity/utils/classes.py +194 -0
- voxcity/utils/lc.py +80 -39
- voxcity/utils/logging.py +61 -0
- voxcity/utils/orientation.py +51 -0
- voxcity/utils/shape.py +230 -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 +1145 -0
- {voxcity-0.6.26.dist-info → voxcity-1.0.2.dist-info}/METADATA +162 -48
- voxcity-1.0.2.dist-info/RECORD +81 -0
- voxcity/generator.py +0 -1302
- voxcity/geoprocessor/grid.py +0 -1739
- voxcity/geoprocessor/polygon.py +0 -1344
- voxcity/simulator/solar.py +0 -2339
- voxcity/utils/visualization.py +0 -2849
- voxcity/utils/weather.py +0 -1038
- voxcity-0.6.26.dist-info/RECORD +0 -38
- {voxcity-0.6.26.dist-info → voxcity-1.0.2.dist-info}/WHEEL +0 -0
- {voxcity-0.6.26.dist-info → voxcity-1.0.2.dist-info}/licenses/AUTHORS.rst +0 -0
- {voxcity-0.6.26.dist-info → voxcity-1.0.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: voxcity
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 1.0.2
|
|
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
6
|
License-File: AUTHORS.rst
|
|
@@ -29,6 +29,7 @@ Requires-Dist: ipyleaflet
|
|
|
29
29
|
Requires-Dist: joblib
|
|
30
30
|
Requires-Dist: lxml
|
|
31
31
|
Requires-Dist: matplotlib
|
|
32
|
+
Requires-Dist: nbformat
|
|
32
33
|
Requires-Dist: netCDF4
|
|
33
34
|
Requires-Dist: numba
|
|
34
35
|
Requires-Dist: numpy
|
|
@@ -69,13 +70,15 @@ Description-Content-Type: text/markdown
|
|
|
69
70
|
<!-- [](https://creativecommons.org/licenses/by-sa/4.0/) -->
|
|
70
71
|
|
|
71
72
|
<p align="center">
|
|
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>
|
|
73
|
+
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>
|
|
73
74
|
</p>
|
|
74
75
|
|
|
75
76
|
<p align="center">
|
|
76
77
|
<img src="https://raw.githubusercontent.com/kunifujiwara/VoxCity/main/images/logo.png" alt="Voxcity logo" width="550">
|
|
77
78
|
</p>
|
|
78
79
|
|
|
80
|
+
|
|
81
|
+
|
|
79
82
|
# VoxCity
|
|
80
83
|
|
|
81
84
|
**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.
|
|
@@ -90,6 +93,21 @@ Description-Content-Type: text/markdown
|
|
|
90
93
|
<img src="https://raw.githubusercontent.com/kunifujiwara/VoxCity/main/images/concept.png" alt="Conceptual Diagram of voxcity" width="800">
|
|
91
94
|
</p>
|
|
92
95
|
|
|
96
|
+
## Tutorial
|
|
97
|
+
|
|
98
|
+
- **Google Colab (interactive notebook)**: <a href="https://colab.research.google.com/drive/1Lofd3RawKMr6QuUsamGaF48u2MN0hfrP?usp=sharing">Open tutorial in Colab</a>
|
|
99
|
+
- **YouTube video (walkthrough)**: <a href="https://youtu.be/qHusvKB07qk">Watch on YouTube</a>
|
|
100
|
+
|
|
101
|
+
<p align="center">
|
|
102
|
+
<a href="https://youtu.be/qHusvKB07qk" title="Click to watch the VoxCity tutorial on YouTube">
|
|
103
|
+
<img src="images/youtube_thumbnail_play.png" alt="VoxCity Tutorial — Click to watch on YouTube" width="480">
|
|
104
|
+
</a>
|
|
105
|
+
</p>
|
|
106
|
+
|
|
107
|
+
<p align="center">
|
|
108
|
+
<em>Tutorial video by <a href="https://ual.sg/author/liang-xiucheng/">Xiucheng Liang</a></em>
|
|
109
|
+
</p>
|
|
110
|
+
|
|
93
111
|
|
|
94
112
|
## Key Features
|
|
95
113
|
|
|
@@ -120,6 +138,55 @@ Description-Content-Type: text/markdown
|
|
|
120
138
|
- **View Index Simulations**: Compute sky view index (SVI) and green view index (GVI) from a specified viewpoint.
|
|
121
139
|
- **Landmark Visibility Maps**: Assess the visibility of selected landmarks within the voxelized environment.
|
|
122
140
|
|
|
141
|
+
## Class Definitions
|
|
142
|
+
|
|
143
|
+
VoxCity uses standardized class definitions for voxel grids and land cover data.
|
|
144
|
+
|
|
145
|
+
### Voxel Semantic Codes
|
|
146
|
+
|
|
147
|
+
The 3D voxel grid uses integer codes to represent different urban elements:
|
|
148
|
+
|
|
149
|
+
| Code | Description |
|
|
150
|
+
|------|-------------|
|
|
151
|
+
| -3 | Building volume |
|
|
152
|
+
| -2 | Tree canopy (vegetation) |
|
|
153
|
+
| -1 | Ground/Subsurface |
|
|
154
|
+
| ≥1 | Land cover class at ground surface |
|
|
155
|
+
|
|
156
|
+
### Standard Land Cover Classes (1-based indices)
|
|
157
|
+
|
|
158
|
+
VoxCity standardizes land cover to a 1-based indexing system (1-14) for consistency across different data sources:
|
|
159
|
+
|
|
160
|
+
| Index | Class Name |
|
|
161
|
+
|-------|------------|
|
|
162
|
+
| 1 | Bareland |
|
|
163
|
+
| 2 | Rangeland |
|
|
164
|
+
| 3 | Shrub |
|
|
165
|
+
| 4 | Agriculture land |
|
|
166
|
+
| 5 | Tree |
|
|
167
|
+
| 6 | Moss and lichen |
|
|
168
|
+
| 7 | Wet land |
|
|
169
|
+
| 8 | Mangrove |
|
|
170
|
+
| 9 | Water |
|
|
171
|
+
| 10 | Snow and ice |
|
|
172
|
+
| 11 | Developed space |
|
|
173
|
+
| 12 | Road |
|
|
174
|
+
| 13 | Building |
|
|
175
|
+
| 14 | No Data |
|
|
176
|
+
|
|
177
|
+
You can also access these definitions programmatically:
|
|
178
|
+
|
|
179
|
+
```python
|
|
180
|
+
from voxcity.utils import print_class_definitions, print_voxel_codes, print_land_cover_classes
|
|
181
|
+
|
|
182
|
+
# Print all class definitions
|
|
183
|
+
print_class_definitions()
|
|
184
|
+
|
|
185
|
+
# Or print separately
|
|
186
|
+
print_voxel_codes()
|
|
187
|
+
print_land_cover_classes()
|
|
188
|
+
```
|
|
189
|
+
|
|
123
190
|
## Installation
|
|
124
191
|
|
|
125
192
|
Make sure you have Python 3.12 installed. Install voxcity with:
|
|
@@ -213,15 +280,12 @@ m
|
|
|
213
280
|
|
|
214
281
|
### 3. Set Parameters
|
|
215
282
|
|
|
216
|
-
Define
|
|
283
|
+
Define mesh size (required) and optional data sources:
|
|
217
284
|
|
|
218
285
|
```python
|
|
219
|
-
|
|
220
|
-
land_cover_source = 'OpenStreetMap' # Land cover classification data source
|
|
221
|
-
canopy_height_source = 'High Resolution 1m Global Canopy Height Maps' # Tree canopy height data source
|
|
222
|
-
dem_source = 'DeltaDTM' # Digital elevation model data source
|
|
223
|
-
meshsize = 5 # Grid cell size in meters
|
|
286
|
+
meshsize = 5 # Grid cell size in meters (required)
|
|
224
287
|
|
|
288
|
+
# Optional: Specify output directory and other settings
|
|
225
289
|
kwargs = {
|
|
226
290
|
"output_dir": "output", # Directory to save output files
|
|
227
291
|
"dem_interpolation": True # Enable DEM interpolation
|
|
@@ -230,24 +294,56 @@ kwargs = {
|
|
|
230
294
|
|
|
231
295
|
### 4. Get voxcity Output
|
|
232
296
|
|
|
233
|
-
Generate voxel data grids and corresponding building
|
|
297
|
+
Generate voxel data grids and a corresponding building GeoDataFrame.
|
|
298
|
+
|
|
299
|
+
#### Option 1: Automatic Mode (Recommended)
|
|
300
|
+
Data sources are automatically selected based on location:
|
|
234
301
|
|
|
235
302
|
```python
|
|
236
303
|
from voxcity.generator import get_voxcity
|
|
237
304
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
305
|
+
# Auto mode: all data sources selected automatically based on location
|
|
306
|
+
voxcity = get_voxcity(
|
|
307
|
+
rectangle_vertices,
|
|
308
|
+
meshsize,
|
|
309
|
+
**kwargs
|
|
310
|
+
)
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
#### Option 2: Custom Mode
|
|
314
|
+
Specify data sources explicitly:
|
|
315
|
+
|
|
316
|
+
```python
|
|
317
|
+
# Custom mode: specify all data sources
|
|
318
|
+
voxcity = get_voxcity(
|
|
241
319
|
rectangle_vertices,
|
|
242
|
-
building_source,
|
|
243
|
-
land_cover_source,
|
|
244
|
-
canopy_height_source,
|
|
245
|
-
dem_source,
|
|
246
320
|
meshsize,
|
|
321
|
+
building_source='OpenStreetMap',
|
|
322
|
+
land_cover_source='OpenStreetMap',
|
|
323
|
+
canopy_height_source='High Resolution 1m Global Canopy Height Maps',
|
|
324
|
+
dem_source='DeltaDTM',
|
|
247
325
|
**kwargs
|
|
248
326
|
)
|
|
249
327
|
```
|
|
250
328
|
|
|
329
|
+
#### Option 3: Hybrid Mode
|
|
330
|
+
Specify some sources, auto-select others:
|
|
331
|
+
|
|
332
|
+
```python
|
|
333
|
+
# Hybrid mode: specify building source, auto-select others
|
|
334
|
+
voxcity = get_voxcity(
|
|
335
|
+
rectangle_vertices,
|
|
336
|
+
meshsize,
|
|
337
|
+
building_source='Overture', # Custom
|
|
338
|
+
# land_cover_source, canopy_height_source, dem_source auto-selected
|
|
339
|
+
**kwargs
|
|
340
|
+
)
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### Interactive 3D Demo (Plotly)
|
|
344
|
+
|
|
345
|
+
- **Open interactive demo**: <a href="https://voxcity.readthedocs.io/en/latest/_static/plotly/voxcity_demo.html">Launch the Plotly 3D viewer</a>
|
|
346
|
+
|
|
251
347
|
### 5. Exporting Files
|
|
252
348
|
|
|
253
349
|
#### ENVI-MET INX/EDB Files:
|
|
@@ -257,18 +353,36 @@ building_gdf = get_voxcity(
|
|
|
257
353
|
from voxcity.exporter.envimet import export_inx, generate_edb_file
|
|
258
354
|
|
|
259
355
|
envimet_kwargs = {
|
|
260
|
-
"output_directory": "output",
|
|
261
|
-
"
|
|
262
|
-
"
|
|
263
|
-
"
|
|
264
|
-
"
|
|
265
|
-
"
|
|
266
|
-
"
|
|
267
|
-
"
|
|
356
|
+
"output_directory": "output", # Directory where output files will be saved
|
|
357
|
+
"file_basename": "voxcity", # Base name (without extension) for INX
|
|
358
|
+
"author_name": "your name", # Name of the model author
|
|
359
|
+
"model_description": "generated with voxcity", # Description for the model
|
|
360
|
+
"domain_building_max_height_ratio": 2, # Max ratio between domain height and tallest building
|
|
361
|
+
"useTelescoping_grid": True, # Enable telescoping grid
|
|
362
|
+
"verticalStretch": 20, # Vertical grid stretching factor (%)
|
|
363
|
+
"min_grids_Z": 20, # Minimum number of vertical grid cells
|
|
364
|
+
"lad": 1.0 # Leaf Area Density (m2/m3) for EDB generation
|
|
268
365
|
}
|
|
269
366
|
|
|
270
|
-
|
|
271
|
-
|
|
367
|
+
# Optional: specify land cover source used for export (otherwise taken from voxcity.extras when available)
|
|
368
|
+
land_cover_source = 'OpenStreetMap'
|
|
369
|
+
|
|
370
|
+
# Export INX by passing the VoxCity object directly
|
|
371
|
+
export_inx(
|
|
372
|
+
voxcity,
|
|
373
|
+
output_directory=envimet_kwargs["output_directory"],
|
|
374
|
+
file_basename=envimet_kwargs["file_basename"],
|
|
375
|
+
land_cover_source=land_cover_source,
|
|
376
|
+
author_name=envimet_kwargs["author_name"],
|
|
377
|
+
model_description=envimet_kwargs["model_description"],
|
|
378
|
+
domain_building_max_height_ratio=envimet_kwargs["domain_building_max_height_ratio"],
|
|
379
|
+
useTelescoping_grid=envimet_kwargs["useTelescoping_grid"],
|
|
380
|
+
verticalStretch=envimet_kwargs["verticalStretch"],
|
|
381
|
+
min_grids_Z=envimet_kwargs["min_grids_Z"],
|
|
382
|
+
)
|
|
383
|
+
|
|
384
|
+
# Generate plant database (EDB) for vegetation
|
|
385
|
+
generate_edb_file(lad=envimet_kwargs["lad"])
|
|
272
386
|
```
|
|
273
387
|
<p align="center">
|
|
274
388
|
<img src="https://raw.githubusercontent.com/kunifujiwara/VoxCity/main/images/envimet.png" alt="Generated 3D City Model on Envi-MET GUI" width="600">
|
|
@@ -284,7 +398,8 @@ from voxcity.exporter.obj import export_obj
|
|
|
284
398
|
|
|
285
399
|
output_directory = "output" # Directory where output files will be saved
|
|
286
400
|
output_file_name = "voxcity" # Base name for the output OBJ file
|
|
287
|
-
|
|
401
|
+
# Pass the VoxCity object directly (voxel size inferred)
|
|
402
|
+
export_obj(voxcity, output_directory, output_file_name)
|
|
288
403
|
```
|
|
289
404
|
The generated OBJ files can be opened and rendered in the following 3D visualization software:
|
|
290
405
|
|
|
@@ -308,7 +423,8 @@ from voxcity.exporter.magicavoxel import export_magicavoxel_vox
|
|
|
308
423
|
|
|
309
424
|
output_path = "output"
|
|
310
425
|
base_filename = "voxcity"
|
|
311
|
-
|
|
426
|
+
# Pass the VoxCity object directly
|
|
427
|
+
export_magicavoxel_vox(voxcity, output_path, base_filename=base_filename)
|
|
312
428
|
```
|
|
313
429
|
<p align="center">
|
|
314
430
|
<img src="https://raw.githubusercontent.com/kunifujiwara/VoxCity/main/images/vox.png" alt="Generated 3D City Model on MagicaVoxel GUI" width="600">
|
|
@@ -326,13 +442,11 @@ from voxcity.simulator.solar import get_global_solar_irradiance_using_epw
|
|
|
326
442
|
|
|
327
443
|
solar_kwargs = {
|
|
328
444
|
"download_nearest_epw": True, # Whether to automatically download nearest EPW weather file based on location from Climate.OneBuilding.Org
|
|
329
|
-
"rectangle_vertices": rectangle_vertices, # Coordinates defining the area of interest for calculation
|
|
330
445
|
# "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.
|
|
331
446
|
"calc_time": "01-01 12:00:00", # Time for instantaneous calculation in format "MM-DD HH:MM:SS"
|
|
332
447
|
"view_point_height": 1.5, # Height of view point in meters for calculating solar access. Default: 1.5 m
|
|
333
448
|
"tree_k": 0.6, # Static extinction coefficient - controls how much sunlight is blocked by trees (higher = more blocking)
|
|
334
449
|
"tree_lad": 1.0, # Leaf area density of trees - density of leaves/branches that affect shading (higher = denser foliage)
|
|
335
|
-
"dem_grid": dem_grid, # Digital elevation model grid for terrain heights
|
|
336
450
|
"colormap": 'magma', # Matplotlib colormap for visualization. Default: 'viridis'
|
|
337
451
|
"obj_export": True, # Whether to export results as 3D OBJ file
|
|
338
452
|
"output_directory": 'output/test', # Directory for saving output files
|
|
@@ -343,9 +457,8 @@ solar_kwargs = {
|
|
|
343
457
|
}
|
|
344
458
|
|
|
345
459
|
# Compute global solar irradiance map (direct + diffuse radiation)
|
|
346
|
-
solar_grid = get_global_solar_irradiance_using_epw(
|
|
347
|
-
|
|
348
|
-
meshsize, # Size of each voxel in meters
|
|
460
|
+
solar_grid = get_global_solar_irradiance_using_epw(
|
|
461
|
+
voxcity, # VoxCity object containing voxel data and metadata
|
|
349
462
|
calc_type='instantaneous', # Calculate instantaneous irradiance at specified time
|
|
350
463
|
direct_normal_irradiance_scaling=1.0, # Scaling factor for direct solar radiation (1.0 = no scaling)
|
|
351
464
|
diffuse_irradiance_scaling=1.0, # Scaling factor for diffuse solar radiation (1.0 = no scaling)
|
|
@@ -355,12 +468,11 @@ solar_grid = get_global_solar_irradiance_using_epw(
|
|
|
355
468
|
# Adjust parameters for cumulative calculation
|
|
356
469
|
solar_kwargs["start_time"] = "01-01 01:00:00" # Start time for cumulative calculation
|
|
357
470
|
solar_kwargs["end_time"] = "01-31 23:00:00" # End time for cumulative calculation
|
|
358
|
-
solar_kwargs["output_file_name"] = '
|
|
471
|
+
solar_kwargs["output_file_name"] = 'cumulative_solar_irradiance' # Base filename for outputs (without extension)
|
|
359
472
|
|
|
360
473
|
# Calculate cumulative solar irradiance over the specified time period
|
|
361
|
-
cum_solar_grid = get_global_solar_irradiance_using_epw(
|
|
362
|
-
|
|
363
|
-
meshsize, # Size of each voxel in meters
|
|
474
|
+
cum_solar_grid = get_global_solar_irradiance_using_epw(
|
|
475
|
+
voxcity, # VoxCity object containing voxel data and metadata
|
|
364
476
|
calc_type='cumulative', # Calculate cumulative irradiance over time period instead of instantaneous
|
|
365
477
|
direct_normal_irradiance_scaling=1.0, # Scaling factor for direct solar radiation (1.0 = no scaling)
|
|
366
478
|
diffuse_irradiance_scaling=1.0, # Scaling factor for diffuse solar radiation (1.0 = no scaling)
|
|
@@ -382,7 +494,6 @@ from voxcity.simulator.view import get_view_index
|
|
|
382
494
|
|
|
383
495
|
view_kwargs = {
|
|
384
496
|
"view_point_height": 1.5, # Height of observer viewpoint in meters
|
|
385
|
-
"dem_grid": dem_grid, # Digital elevation model grid
|
|
386
497
|
"colormap": "viridis", # Colormap for visualization
|
|
387
498
|
"obj_export": True, # Whether to export as OBJ file
|
|
388
499
|
"output_directory": "output", # Directory to save output files
|
|
@@ -390,7 +501,7 @@ view_kwargs = {
|
|
|
390
501
|
}
|
|
391
502
|
|
|
392
503
|
# Compute Green View Index using mode='green'
|
|
393
|
-
gvi_grid = get_view_index(
|
|
504
|
+
gvi_grid = get_view_index(voxcity, mode='green', **view_kwargs)
|
|
394
505
|
|
|
395
506
|
# Adjust parameters for Sky View Index
|
|
396
507
|
view_kwargs["colormap"] = "BuPu_r"
|
|
@@ -398,7 +509,7 @@ view_kwargs["output_file_name"] = "svi"
|
|
|
398
509
|
view_kwargs["elevation_min_degrees"] = 0 # Start ray-tracing from the horizon
|
|
399
510
|
|
|
400
511
|
# Compute Sky View Index using mode='sky'
|
|
401
|
-
svi_grid = get_view_index(
|
|
512
|
+
svi_grid = get_view_index(voxcity, mode='sky', **view_kwargs)
|
|
402
513
|
```
|
|
403
514
|
<p align="center">
|
|
404
515
|
<img src="https://raw.githubusercontent.com/kunifujiwara/VoxCity/main/images/view_index.png" alt="View Index Maps Rendered in Rhino" width="800">
|
|
@@ -415,14 +526,12 @@ from voxcity.simulator.view import get_landmark_visibility_map
|
|
|
415
526
|
# Dictionary of parameters for landmark visibility analysis
|
|
416
527
|
landmark_kwargs = {
|
|
417
528
|
"view_point_height": 1.5, # Height of observer viewpoint in meters
|
|
418
|
-
"rectangle_vertices": rectangle_vertices, # Vertices defining simulation domain boundary
|
|
419
|
-
"dem_grid": dem_grid, # Digital elevation model grid
|
|
420
529
|
"colormap": "cool", # Colormap for visualization
|
|
421
530
|
"obj_export": True, # Whether to export as OBJ file
|
|
422
531
|
"output_directory": "output", # Directory to save output files
|
|
423
532
|
"output_file_name": "landmark_visibility" # Base filename for outputs
|
|
424
533
|
}
|
|
425
|
-
landmark_vis_map = get_landmark_visibility_map(
|
|
534
|
+
landmark_vis_map, _ = get_landmark_visibility_map(voxcity, voxcity.extras.get('building_gdf'), **landmark_kwargs)
|
|
426
535
|
```
|
|
427
536
|
<p align="center">
|
|
428
537
|
<img src="https://raw.githubusercontent.com/kunifujiwara/VoxCity/main/images/landmark.png" alt="Landmark Visibility Map Rendered in Rhino" width="500">
|
|
@@ -508,22 +617,27 @@ G, edge_gdf = get_network_values(
|
|
|
508
617
|
|
|
509
618
|
## Citation
|
|
510
619
|
|
|
511
|
-
Please cite the [paper](https://doi.org/10.
|
|
620
|
+
Please cite the [paper](https://doi.org/10.1016/j.compenvurbsys.2025.102366) if you use `voxcity` in a scientific publication:
|
|
512
621
|
|
|
513
|
-
Fujiwara K, Tsurumi R, Kiyono T, Fan Z, Liang X, Lei B, Yap W, Ito K, Biljecki F. VoxCity: A Seamless Framework for Open Geospatial Data Integration, Grid-Based Semantic 3D City Model Generation, and Urban Environment Simulation.
|
|
622
|
+
Fujiwara K, Tsurumi R, Kiyono T, Fan Z, Liang X, Lei B, Yap W, Ito K, Biljecki F., 2026. VoxCity: A Seamless Framework for Open Geospatial Data Integration, Grid-Based Semantic 3D City Model Generation, and Urban Environment Simulation. Computers, Environment and Urban Systems, 123, p.102366. https://doi.org/10.1016/j.compenvurbsys.2025.102366
|
|
514
623
|
|
|
515
624
|
```bibtex
|
|
516
625
|
@article{fujiwara2025voxcity,
|
|
517
626
|
title={VoxCity: A Seamless Framework for Open Geospatial Data Integration, Grid-Based Semantic 3D City Model Generation, and Urban Environment Simulation},
|
|
518
627
|
author={Fujiwara, Kunihiko and Tsurumi, Ryuta and Kiyono, Tomoki and Fan, Zicheng and Liang, Xiucheng and Lei, Binyu and Yap, Winston and Ito, Koichi and Biljecki, Filip},
|
|
519
|
-
journal={
|
|
520
|
-
|
|
521
|
-
|
|
628
|
+
journal={Computers, Environment and Urban Systems},
|
|
629
|
+
volume = {123},
|
|
630
|
+
pages = {102366},
|
|
631
|
+
year = {2026},
|
|
632
|
+
doi = {10.1016/j.compenvurbsys.2025.102366}
|
|
522
633
|
}
|
|
634
|
+
|
|
523
635
|
```
|
|
524
636
|
|
|
525
637
|
## Credit
|
|
526
638
|
|
|
639
|
+
- Tutorial video by <a href="https://ual.sg/author/liang-xiucheng/">Xiucheng Liang</a>
|
|
640
|
+
|
|
527
641
|
This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [`audreyr/cookiecutter-pypackage`](https://github.com/audreyr/cookiecutter-pypackage) project template.
|
|
528
642
|
|
|
529
643
|
--------------------------------------------------------------------------------
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
voxcity/__init__.py,sha256=_qSejkOJw5lXnNJWHbgLfWnerPoRl0R-tLyPB-GNNuw,458
|
|
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=6qfyTO8ey4ErmdLCes5KArdnQ_Cdt1Oj6wq5qSaNFOE,333
|
|
14
|
+
voxcity/exporter/cityles.py,sha256=0mz3sdQb9VCB62m9vuio5x8sDf0-9NFCwVkS6eldQ34,22797
|
|
15
|
+
voxcity/exporter/envimet.py,sha256=U5FBjiIQVrG1LrdbgSqMd6SBVpF4Y6S9a3KpMLudDjY,32047
|
|
16
|
+
voxcity/exporter/magicavoxel.py,sha256=QMS547mWqw8RJ-Muba9XNo058E5_oLf-FkHPu8x6kfA,14162
|
|
17
|
+
voxcity/exporter/netcdf.py,sha256=MQhUmyHc_6mVzmlPLIJJQSqATo7AHjkEL-QJ__XViWI,8543
|
|
18
|
+
voxcity/exporter/obj.py,sha256=2LBNF7uJj-myl4AiJsv1yEEa1odT87e0VLvAtdpcEKY,63001
|
|
19
|
+
voxcity/generator/__init__.py,sha256=l11VF8qrSyU-kJUFS4DfzoCGhewPnBeo25RfLxS5LpI,1241
|
|
20
|
+
voxcity/generator/api.py,sha256=S71J4TEyiGYTn0WzALiJRgYtP2mCfRu2jid-xNNRIY8,36127
|
|
21
|
+
voxcity/generator/grids.py,sha256=Ht_XRhbBfEvWvRGTr0U1DEOhtFYHaojuf2lXnOGAT-A,20423
|
|
22
|
+
voxcity/generator/io.py,sha256=hsDeHDKtHQ59hTabYBtrqYeROVjLtxKBcdUY0JVV3cA,3257
|
|
23
|
+
voxcity/generator/pipeline.py,sha256=sCYbxNt1KY1SHGTeIEW8jBfD-yhJHdWIXcKijF4_tjA,11891
|
|
24
|
+
voxcity/generator/update.py,sha256=7udcBckThnffKwe3YQv30G2hSqAVACn2mPL1ZXHtwNE,16157
|
|
25
|
+
voxcity/generator/voxelizer.py,sha256=ym-H4PzvCnEe9UOFzKbaul8u4EyOtjNFANGIXU7kJiA,16197
|
|
26
|
+
voxcity/geoprocessor/__init__.py,sha256=TwFsKhuvZtIC3d_bykvhzJxnxvubHoWeBp3bBbcrw7k,1721
|
|
27
|
+
voxcity/geoprocessor/conversion.py,sha256=Bdf_SNqOhTqYW44MPLWx6-5iyVmZO2Yy1eZ6pDDgyvs,5007
|
|
28
|
+
voxcity/geoprocessor/draw.py,sha256=O9bBC4q6xLzGYzN3kJc2Pdxry0D4D_P_ZEcIF-1M2qg,62781
|
|
29
|
+
voxcity/geoprocessor/heights.py,sha256=cAksRWaLPFKhv9YsMybT0DCMyuE9WNajRXHpRFbSyN4,8636
|
|
30
|
+
voxcity/geoprocessor/io.py,sha256=iLoip3NXuyj7mk4xvRPMnouIVoR0swzIdrg6R08D68I,3427
|
|
31
|
+
voxcity/geoprocessor/merge_utils.py,sha256=OKMSUAEE9jPiNslzDjWOxrP3s-VSxhEVkWVmDMmbjrI,3159
|
|
32
|
+
voxcity/geoprocessor/mesh.py,sha256=exKl8MagO7jizjebbGNfVJjGRxBv1eH1t5nt7dR1g3k,32913
|
|
33
|
+
voxcity/geoprocessor/network.py,sha256=hNgovcCDZFZzBM1dF3gu02Bk13sNxH90HrRtd7nOKQw,26640
|
|
34
|
+
voxcity/geoprocessor/overlap.py,sha256=taWkqtS79gL-QBClPboz8XzqARO5BwqaTA4iTHvkRfI,2783
|
|
35
|
+
voxcity/geoprocessor/raster/__init__.py,sha256=3f1qGOsM0kpfa7lw4k-uYqXwuN0Eaxp7WcWUcpgEtCs,2287
|
|
36
|
+
voxcity/geoprocessor/raster/buildings.py,sha256=0y7IakrQg_-1NV4pvSjQoRXalWxzjshY0hpjUWz9qlk,19647
|
|
37
|
+
voxcity/geoprocessor/raster/canopy.py,sha256=DvDB8mT_fY9NaJjanEbv1DCaR9Ceqjn0AIxqiHy4jbs,9668
|
|
38
|
+
voxcity/geoprocessor/raster/core.py,sha256=NcT-DRXnjacDYkR5k5FfsPbh4nw1NBGluQBXwO9Y4cM,5441
|
|
39
|
+
voxcity/geoprocessor/raster/export.py,sha256=DCSToWKz249LlnhNShYCE6Ll_9I1d_wcQLzMHHOlQ5Q,3631
|
|
40
|
+
voxcity/geoprocessor/raster/landcover.py,sha256=IzGogo2ZMRPrd7qDtgxAiNb21g4I_JjJ4daLKssvBs0,6492
|
|
41
|
+
voxcity/geoprocessor/raster/raster.py,sha256=KLo1Z4-cztX8GLJ-mwYlbPvn1BGCIH7QwfrJDtD3miI,4425
|
|
42
|
+
voxcity/geoprocessor/selection.py,sha256=NE2Z0Y1IJkBPB3dEvk0yzZoye9WWGjJVm9xj6m71ZiI,2672
|
|
43
|
+
voxcity/geoprocessor/utils.py,sha256=YrGnubtBKsGocEZx9a2v8Prx1aiXtN_BCB_DWgvaB-w,32398
|
|
44
|
+
voxcity/models.py,sha256=2l070TW4envQ18Pu2tQcFVX0i8GYs7hd6nH1nsfpp9Y,2896
|
|
45
|
+
voxcity/simulator/__init__.py,sha256=APdkcdaovj0v_RPOaA4SBvFUKT2RM7Hxuuz3Sux4gCo,65
|
|
46
|
+
voxcity/simulator/common/__init__.py,sha256=Yi5h8DtLFUB8T6TsmDeVxuafjcwzpRXXgsN5nmvJLJk,486
|
|
47
|
+
voxcity/simulator/common/geometry.py,sha256=Zb9nI6q7lPcnX5O9YC-yMwhvYw6QtqxZN468Ikh82yE,3414
|
|
48
|
+
voxcity/simulator/common/raytracing.py,sha256=j9QiI9NIzqkIm8MOipqJCJeFtPWPTYxeAh-wP_lkAek,16343
|
|
49
|
+
voxcity/simulator/solar/__init__.py,sha256=uG1PXEwE3137WE_DgSo8Q7evUNdnfuJhNjE-2HfHUZQ,1960
|
|
50
|
+
voxcity/simulator/solar/integration.py,sha256=W9NfGTpE_OcBulUfw9b3xM68hR8WuMbXi9_80-viufw,13867
|
|
51
|
+
voxcity/simulator/solar/kernels.py,sha256=SLglw8dyIYdG8eN65aQsqTd4PmEuX2tkdwXJgPZ3Y3Q,2158
|
|
52
|
+
voxcity/simulator/solar/radiation.py,sha256=woSTmiDEUrGMGJyDsWr3kWL5wISMUBZuqc0KdoYJblk,22576
|
|
53
|
+
voxcity/simulator/solar/sky.py,sha256=QqijmqEkMrGVIcxUYpjarkZ-Ed_MaSSrFW9wQUsikzE,23035
|
|
54
|
+
voxcity/simulator/solar/temporal.py,sha256=wwooPqX8BAyNh9O1vAYZLuEkbvqAijJBsgD0Ku5GVTo,33998
|
|
55
|
+
voxcity/simulator/utils.py,sha256=sEYBB2-hLJxTiXQps1_-Fi7t1HN3-1OPOvBCWtgIisA,130
|
|
56
|
+
voxcity/simulator/view.py,sha256=Shqn7rFhhzCEPYHTu8Wg-6uCZ8SNrPCODY4sYzk8MmI,1058
|
|
57
|
+
voxcity/simulator/visibility/__init__.py,sha256=mpBVeZO3IRJAcEX8fookdDgquBVKvzCRuNMNM4jrD_4,664
|
|
58
|
+
voxcity/simulator/visibility/landmark.py,sha256=E0bpivtjt9oJop0zsvWXE693o-RebU66H_EbLKlPDXk,17542
|
|
59
|
+
voxcity/simulator/visibility/view.py,sha256=w_zPmMxyHdwTURBowX-AhlvHEBjSCUsEpt865-eoBHE,21642
|
|
60
|
+
voxcity/utils/__init__.py,sha256=h9WBvqn7eLHravfFg_d1A3jDPld_EzLhbSIavzd_TAg,334
|
|
61
|
+
voxcity/utils/classes.py,sha256=U2WJsUVd6xaBj7xacehLedQMc6NegMXG7Jf8QK5fE40,6259
|
|
62
|
+
voxcity/utils/lc.py,sha256=iRPjHcdIqF7fvIs8jCbez9x8JF762KRcqYee6HkVP2A,18096
|
|
63
|
+
voxcity/utils/logging.py,sha256=BZGOSKrAh_aBrNgVD_jX5lJXAOc4wkTuB0R_fbp3DBU,1652
|
|
64
|
+
voxcity/utils/material.py,sha256=H8K8Lq4wBL6dQtgj7esUW2U6wLCOTeOtelkTDJoRgMo,10007
|
|
65
|
+
voxcity/utils/orientation.py,sha256=sVV2VipImBsijcJ8gw_uv1zbs4b95QoJf0qC0R39VPM,2014
|
|
66
|
+
voxcity/utils/shape.py,sha256=IRNnlAF506fQwRDXrSNupsq4lVs4dY3YkeLMSaTO_1g,7713
|
|
67
|
+
voxcity/utils/weather/__init__.py,sha256=r8Qrybs1lSsFbi9_HRmEmi9oVLXSaYi_fBYk8UMZ_Tk,722
|
|
68
|
+
voxcity/utils/weather/epw.py,sha256=f2u7jzwYd7Kb5L7cCkyrBiKPN7iE5gk81luOXjAQRKM,5424
|
|
69
|
+
voxcity/utils/weather/files.py,sha256=ogbfCX-5wBF_fhb3pJa2-71yDT8SlV1JSqna-QwyIR0,987
|
|
70
|
+
voxcity/utils/weather/onebuilding.py,sha256=WWococ9NWU54_ATIy_59ZE_Wkfk8WkB2nAf3j-X5BFM,24695
|
|
71
|
+
voxcity/visualizer/__init__.py,sha256=N02juUFewmt-QoZMVc1cE2h-PwWiNeGS7MbjGhihZH4,981
|
|
72
|
+
voxcity/visualizer/builder.py,sha256=S-tbGGerrxjfjm4xshvp4_j7Qk7vJzcNgYCPww1bQ4c,1411
|
|
73
|
+
voxcity/visualizer/grids.py,sha256=Hi5ZbTy5oYLYFOSJDFBmMjFCwLr9F6de6UT1VjzGvNc,6990
|
|
74
|
+
voxcity/visualizer/maps.py,sha256=0Dm-4LM9uOI-FX7MlEQKPyf_g9mFMoGtKSDdwN9lsuE,8990
|
|
75
|
+
voxcity/visualizer/palette.py,sha256=ThZQlLwUSSfN516h9DyMry0CTYJVXeJDdL7oP41_zKg,7088
|
|
76
|
+
voxcity/visualizer/renderer.py,sha256=ul97UUrPQkJt259vf5v7iEUkZC2EnJs_EsLESJe6xcU,48980
|
|
77
|
+
voxcity-1.0.2.dist-info/licenses/AUTHORS.rst,sha256=m82vkI5QokEGdcHof2OxK39lf81w1P58kG9ZNNAKS9U,175
|
|
78
|
+
voxcity-1.0.2.dist-info/licenses/LICENSE,sha256=s_jE1Df1nTPL4A_5GCGic5Zwex0CVaPKcAmSilxJPPE,1089
|
|
79
|
+
voxcity-1.0.2.dist-info/METADATA,sha256=kb2RduAo88LITMRWOaZ58KSX7VP5EaEDzvaqoorcEWc,28809
|
|
80
|
+
voxcity-1.0.2.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
81
|
+
voxcity-1.0.2.dist-info/RECORD,,
|