voxcity 0.3.23__tar.gz → 0.3.24__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 (53) hide show
  1. {voxcity-0.3.23 → voxcity-0.3.24}/PKG-INFO +1 -1
  2. {voxcity-0.3.23 → voxcity-0.3.24}/pyproject.toml +1 -1
  3. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/utils/visualization.py +23 -4
  4. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity.egg-info/PKG-INFO +1 -1
  5. {voxcity-0.3.23 → voxcity-0.3.24}/AUTHORS.rst +0 -0
  6. {voxcity-0.3.23 → voxcity-0.3.24}/CONTRIBUTING.rst +0 -0
  7. {voxcity-0.3.23 → voxcity-0.3.24}/HISTORY.rst +0 -0
  8. {voxcity-0.3.23 → voxcity-0.3.24}/LICENSE +0 -0
  9. {voxcity-0.3.23 → voxcity-0.3.24}/MANIFEST.in +0 -0
  10. {voxcity-0.3.23 → voxcity-0.3.24}/README.md +0 -0
  11. {voxcity-0.3.23 → voxcity-0.3.24}/docs/Makefile +0 -0
  12. {voxcity-0.3.23 → voxcity-0.3.24}/docs/archive/README.rst +0 -0
  13. {voxcity-0.3.23 → voxcity-0.3.24}/docs/authors.rst +0 -0
  14. {voxcity-0.3.23 → voxcity-0.3.24}/docs/conf.py +0 -0
  15. {voxcity-0.3.23 → voxcity-0.3.24}/docs/index.rst +0 -0
  16. {voxcity-0.3.23 → voxcity-0.3.24}/docs/make.bat +0 -0
  17. {voxcity-0.3.23 → voxcity-0.3.24}/setup.cfg +0 -0
  18. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/__init__.py +0 -0
  19. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/downloader/__init__.py +0 -0
  20. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/downloader/eubucco.py +0 -0
  21. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/downloader/gee.py +0 -0
  22. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/downloader/mbfp.py +0 -0
  23. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/downloader/oemj.py +0 -0
  24. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/downloader/omt.py +0 -0
  25. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/downloader/osm.py +0 -0
  26. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/downloader/overture.py +0 -0
  27. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/downloader/utils.py +0 -0
  28. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/exporter/__init_.py +0 -0
  29. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/exporter/envimet.py +0 -0
  30. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/exporter/magicavoxel.py +0 -0
  31. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/exporter/obj.py +0 -0
  32. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/generator.py +0 -0
  33. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/geoprocessor/__init_.py +0 -0
  34. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/geoprocessor/draw.py +0 -0
  35. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/geoprocessor/grid.py +0 -0
  36. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/geoprocessor/mesh.py +0 -0
  37. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/geoprocessor/network.py +0 -0
  38. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/geoprocessor/polygon.py +0 -0
  39. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/geoprocessor/utils.py +0 -0
  40. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/simulator/__init_.py +0 -0
  41. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/simulator/solar.py +0 -0
  42. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/simulator/utils.py +0 -0
  43. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/simulator/view.py +0 -0
  44. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/utils/__init_.py +0 -0
  45. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/utils/lc.py +0 -0
  46. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/utils/material.py +0 -0
  47. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity/utils/weather.py +0 -0
  48. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity.egg-info/SOURCES.txt +0 -0
  49. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity.egg-info/dependency_links.txt +0 -0
  50. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity.egg-info/requires.txt +0 -0
  51. {voxcity-0.3.23 → voxcity-0.3.24}/src/voxcity.egg-info/top_level.txt +0 -0
  52. {voxcity-0.3.23 → voxcity-0.3.24}/tests/__init__.py +0 -0
  53. {voxcity-0.3.23 → voxcity-0.3.24}/tests/voxelcity.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: voxcity
3
- Version: 0.3.23
3
+ Version: 0.3.24
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>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "voxcity"
3
- version = "0.3.23"
3
+ version = "0.3.24"
4
4
  requires-python = ">=3.10,<3.13"
5
5
  classifiers = [
6
6
  "Programming Language :: Python :: 3.10",
@@ -923,9 +923,14 @@ def visualize_point_grid_on_basemap(point_gdf, value_name='value', **kwargs):
923
923
  plt.tight_layout()
924
924
  plt.show()
925
925
 
926
- def create_multi_view_scene(meshes, output_directory="output"):
926
+ def create_multi_view_scene(meshes, output_directory="output", projection_type="perspective", distance_factor=1.0):
927
927
  """
928
928
  Create multiple views of the scene from different angles.
929
+
930
+ Args:
931
+ meshes: Dictionary of meshes to visualize
932
+ output_directory: Directory to save output images
933
+ projection_type: Either "perspective" or "orthographic" (default: "perspective")
929
934
  """
930
935
  # Compute overall bounding box across all meshes
931
936
  vertices_list = [mesh.vertices for mesh in meshes.values()]
@@ -939,8 +944,11 @@ def create_multi_view_scene(meshes, output_directory="output"):
939
944
  center = (bbox[1] + bbox[0]) / 2
940
945
  diagonal = np.linalg.norm(bbox[1] - bbox[0])
941
946
 
942
- # Use the diagonal to set the camera distance
943
- distance = diagonal * 2
947
+ # Adjust distance based on projection type
948
+ if projection_type.lower() == "orthographic":
949
+ distance = diagonal * 5 # Increase distance for orthographic to capture full scene
950
+ else:
951
+ distance = diagonal * 1.8 * distance_factor # Original distance for perspective
944
952
 
945
953
  # Define the isometric viewing angles
946
954
  iso_angles = {
@@ -972,6 +980,15 @@ def create_multi_view_scene(meshes, output_directory="output"):
972
980
  for view_name, camera_pos in camera_positions.items():
973
981
  # Create new plotter for each view
974
982
  plotter = pv.Plotter(notebook=True, off_screen=True)
983
+
984
+ # Set the projection type
985
+ if projection_type.lower() == "orthographic":
986
+ plotter.enable_parallel_projection()
987
+ # Set parallel scale to ensure the whole scene is visible
988
+ plotter.camera.parallel_scale = diagonal * 0.4 * distance_factor # Adjust this factor as needed
989
+
990
+ elif projection_type.lower() != "perspective":
991
+ print(f"Warning: Unknown projection_type '{projection_type}'. Using perspective projection.")
975
992
 
976
993
  # Add each mesh to the scene
977
994
  for class_id, mesh in meshes.items():
@@ -1038,6 +1055,8 @@ def visualize_voxcity_multi_view(voxel_array, meshsize, **kwargs):
1038
1055
  cmap_name = kwargs.get("colormap", "viridis")
1039
1056
  vmin = kwargs.get("vmin", np.nanmin(sim_grid))
1040
1057
  vmax = kwargs.get("vmax", np.nanmax(sim_grid))
1058
+ projection_type = kwargs.get("projection_type", "perspective")
1059
+ distance_factor = kwargs.get("distance_factor", 1.0)
1041
1060
 
1042
1061
  # Create meshes
1043
1062
  print("Creating voxel meshes...")
@@ -1078,7 +1097,7 @@ def visualize_voxcity_multi_view(voxel_array, meshsize, **kwargs):
1078
1097
  print("Creating multiple views...")
1079
1098
  # Create output directory if it doesn't exist
1080
1099
  os.makedirs(output_directory, exist_ok=True)
1081
- image_files = create_multi_view_scene(meshes, output_directory=output_directory)
1100
+ image_files = create_multi_view_scene(meshes, output_directory=output_directory, projection_type=projection_type, distance_factor=distance_factor)
1082
1101
 
1083
1102
  # Display each view separately
1084
1103
  for view_name, img_file in image_files:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: voxcity
3
- Version: 0.3.23
3
+ Version: 0.3.24
4
4
  Summary: voxcity is an easy and one-stop tool to output 3d city models for microclimate simulation by integrating multiple geospatial open-data
5
5
  Author-email: Kunihiko Fujiwara <kunihiko@nus.edu.sg>
6
6
  Maintainer-email: Kunihiko Fujiwara <kunihiko@nus.edu.sg>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes