voxcity 0.6.30__tar.gz → 0.6.32__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.

Files changed (39) hide show
  1. {voxcity-0.6.30 → voxcity-0.6.32}/PKG-INFO +10 -5
  2. {voxcity-0.6.30 → voxcity-0.6.32}/README.md +9 -4
  3. {voxcity-0.6.30 → voxcity-0.6.32}/pyproject.toml +1 -1
  4. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/geoprocessor/mesh.py +3 -1
  5. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/utils/visualization.py +2906 -2906
  6. {voxcity-0.6.30 → voxcity-0.6.32}/AUTHORS.rst +0 -0
  7. {voxcity-0.6.30 → voxcity-0.6.32}/LICENSE +0 -0
  8. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/__init__.py +0 -0
  9. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/downloader/__init__.py +0 -0
  10. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/downloader/citygml.py +0 -0
  11. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/downloader/eubucco.py +0 -0
  12. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/downloader/gba.py +0 -0
  13. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/downloader/gee.py +0 -0
  14. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/downloader/mbfp.py +0 -0
  15. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/downloader/oemj.py +0 -0
  16. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/downloader/osm.py +0 -0
  17. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/downloader/overture.py +0 -0
  18. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/downloader/utils.py +0 -0
  19. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/exporter/__init__.py +0 -0
  20. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/exporter/cityles.py +0 -0
  21. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/exporter/envimet.py +0 -0
  22. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/exporter/magicavoxel.py +0 -0
  23. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/exporter/netcdf.py +0 -0
  24. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/exporter/obj.py +0 -0
  25. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/generator.py +0 -0
  26. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/geoprocessor/__init__.py +0 -0
  27. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/geoprocessor/draw.py +0 -0
  28. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/geoprocessor/grid.py +0 -0
  29. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/geoprocessor/network.py +0 -0
  30. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/geoprocessor/polygon.py +0 -0
  31. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/geoprocessor/utils.py +0 -0
  32. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/simulator/__init__.py +0 -0
  33. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/simulator/solar.py +0 -0
  34. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/simulator/utils.py +0 -0
  35. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/simulator/view.py +0 -0
  36. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/utils/__init__.py +0 -0
  37. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/utils/lc.py +0 -0
  38. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/utils/material.py +0 -0
  39. {voxcity-0.6.30 → voxcity-0.6.32}/src/voxcity/utils/weather.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voxcity
3
- Version: 0.6.30
3
+ Version: 0.6.32
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
@@ -247,14 +247,14 @@ kwargs = {
247
247
 
248
248
  ### 4. Get voxcity Output
249
249
 
250
- Generate voxel data grids and corresponding building geoJSON:
250
+ Generate voxel data grids and a corresponding building GeoDataFrame:
251
251
 
252
252
  ```python
253
253
  from voxcity.generator import get_voxcity
254
254
 
255
255
  voxcity_grid, building_height_grid, building_min_height_grid, \
256
- building_id_grid, canopy_height_grid, canopy_bottom_height_grid, land_cover_grid, dem_grid, \
257
- building_gdf = get_voxcity(
256
+ building_id_grid, canopy_height_grid, canopy_bottom_height_grid, land_cover_grid, dem_grid, \
257
+ building_gdf = get_voxcity(
258
258
  rectangle_vertices,
259
259
  building_source,
260
260
  land_cover_source,
@@ -265,6 +265,10 @@ building_gdf = get_voxcity(
265
265
  )
266
266
  ```
267
267
 
268
+ ### Interactive 3D Demo (Plotly)
269
+
270
+ - **Open interactive demo**: <a href="https://voxcity.readthedocs.io/en/latest/_static/plotly/voxcity_demo.html">Launch the Plotly 3D viewer</a>
271
+
268
272
  ### 5. Exporting Files
269
273
 
270
274
  #### ENVI-MET INX/EDB Files:
@@ -301,6 +305,7 @@ from voxcity.exporter.obj import export_obj
301
305
 
302
306
  output_directory = "output" # Directory where output files will be saved
303
307
  output_file_name = "voxcity" # Base name for the output OBJ file
308
+ # export_obj signature: export_obj(array, output_dir, file_name, voxel_size, voxel_color_map=None)
304
309
  export_obj(voxcity_grid, output_directory, output_file_name, meshsize)
305
310
  ```
306
311
  The generated OBJ files can be opened and rendered in the following 3D visualization software:
@@ -372,7 +377,7 @@ solar_grid = get_global_solar_irradiance_using_epw(
372
377
  # Adjust parameters for cumulative calculation
373
378
  solar_kwargs["start_time"] = "01-01 01:00:00" # Start time for cumulative calculation
374
379
  solar_kwargs["end_time"] = "01-31 23:00:00" # End time for cumulative calculation
375
- solar_kwargs["output_file_name"] = 'cummulative_solar_irradiance', # Base filename for outputs (without extension)
380
+ solar_kwargs["output_file_name"] = 'cumulative_solar_irradiance' # Base filename for outputs (without extension)
376
381
 
377
382
  # Calculate cumulative solar irradiance over the specified time period
378
383
  cum_solar_grid = get_global_solar_irradiance_using_epw(
@@ -185,14 +185,14 @@ kwargs = {
185
185
 
186
186
  ### 4. Get voxcity Output
187
187
 
188
- Generate voxel data grids and corresponding building geoJSON:
188
+ Generate voxel data grids and a corresponding building GeoDataFrame:
189
189
 
190
190
  ```python
191
191
  from voxcity.generator import get_voxcity
192
192
 
193
193
  voxcity_grid, building_height_grid, building_min_height_grid, \
194
- building_id_grid, canopy_height_grid, canopy_bottom_height_grid, land_cover_grid, dem_grid, \
195
- building_gdf = get_voxcity(
194
+ building_id_grid, canopy_height_grid, canopy_bottom_height_grid, land_cover_grid, dem_grid, \
195
+ building_gdf = get_voxcity(
196
196
  rectangle_vertices,
197
197
  building_source,
198
198
  land_cover_source,
@@ -203,6 +203,10 @@ building_gdf = get_voxcity(
203
203
  )
204
204
  ```
205
205
 
206
+ ### Interactive 3D Demo (Plotly)
207
+
208
+ - **Open interactive demo**: <a href="https://voxcity.readthedocs.io/en/latest/_static/plotly/voxcity_demo.html">Launch the Plotly 3D viewer</a>
209
+
206
210
  ### 5. Exporting Files
207
211
 
208
212
  #### ENVI-MET INX/EDB Files:
@@ -239,6 +243,7 @@ from voxcity.exporter.obj import export_obj
239
243
 
240
244
  output_directory = "output" # Directory where output files will be saved
241
245
  output_file_name = "voxcity" # Base name for the output OBJ file
246
+ # export_obj signature: export_obj(array, output_dir, file_name, voxel_size, voxel_color_map=None)
242
247
  export_obj(voxcity_grid, output_directory, output_file_name, meshsize)
243
248
  ```
244
249
  The generated OBJ files can be opened and rendered in the following 3D visualization software:
@@ -310,7 +315,7 @@ solar_grid = get_global_solar_irradiance_using_epw(
310
315
  # Adjust parameters for cumulative calculation
311
316
  solar_kwargs["start_time"] = "01-01 01:00:00" # Start time for cumulative calculation
312
317
  solar_kwargs["end_time"] = "01-31 23:00:00" # End time for cumulative calculation
313
- solar_kwargs["output_file_name"] = 'cummulative_solar_irradiance', # Base filename for outputs (without extension)
318
+ solar_kwargs["output_file_name"] = 'cumulative_solar_irradiance' # Base filename for outputs (without extension)
314
319
 
315
320
  # Calculate cumulative solar irradiance over the specified time period
316
321
  cum_solar_grid = get_global_solar_irradiance_using_epw(
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "voxcity"
3
- version = "0.6.30"
3
+ version = "0.6.32"
4
4
  description = "voxcity is an easy and one-stop tool to output 3d city models for microclimate simulation by integrating multiple geospatial open-data"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -318,7 +318,9 @@ def create_sim_surface_mesh(sim_grid, dem_grid,
318
318
  if np.isnan(val):
319
319
  continue
320
320
 
321
- z_base = meshsize * int(dem_grid_flipped[x, y] / meshsize + 1.5) + z_offset
321
+ # Match voxel ground rounding: int(dem/mesh + 0.5) + 1 == int(dem/mesh + 1.5)
322
+ # Then lower the plane by one mesh layer as requested
323
+ z_base = meshsize * int(dem_grid_flipped[x, y] / meshsize + 1.5) + z_offset - meshsize
322
324
 
323
325
  # 4 corners in (x,y)*meshsize
324
326
  v0 = [ x * meshsize, y * meshsize, z_base ]