voxcity 0.5.28__tar.gz → 0.5.29__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.5.28 → voxcity-0.5.29}/PKG-INFO +1 -1
  2. {voxcity-0.5.28 → voxcity-0.5.29}/pyproject.toml +1 -1
  3. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/geoprocessor/draw.py +32 -11
  4. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity.egg-info/PKG-INFO +1 -1
  5. {voxcity-0.5.28 → voxcity-0.5.29}/AUTHORS.rst +0 -0
  6. {voxcity-0.5.28 → voxcity-0.5.29}/CONTRIBUTING.rst +0 -0
  7. {voxcity-0.5.28 → voxcity-0.5.29}/HISTORY.rst +0 -0
  8. {voxcity-0.5.28 → voxcity-0.5.29}/LICENSE +0 -0
  9. {voxcity-0.5.28 → voxcity-0.5.29}/MANIFEST.in +0 -0
  10. {voxcity-0.5.28 → voxcity-0.5.29}/README.md +0 -0
  11. {voxcity-0.5.28 → voxcity-0.5.29}/docs/Makefile +0 -0
  12. {voxcity-0.5.28 → voxcity-0.5.29}/docs/_static/logo.png +0 -0
  13. {voxcity-0.5.28 → voxcity-0.5.29}/docs/conf.py +0 -0
  14. {voxcity-0.5.28 → voxcity-0.5.29}/docs/logo.png +0 -0
  15. {voxcity-0.5.28 → voxcity-0.5.29}/docs/make.bat +0 -0
  16. {voxcity-0.5.28 → voxcity-0.5.29}/setup.cfg +0 -0
  17. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/__init__.py +0 -0
  18. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/downloader/__init__.py +0 -0
  19. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/downloader/citygml.py +0 -0
  20. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/downloader/eubucco.py +0 -0
  21. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/downloader/gee.py +0 -0
  22. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/downloader/mbfp.py +0 -0
  23. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/downloader/oemj.py +0 -0
  24. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/downloader/osm.py +0 -0
  25. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/downloader/overture.py +0 -0
  26. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/downloader/utils.py +0 -0
  27. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/exporter/__init__.py +0 -0
  28. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/exporter/cityles.py +0 -0
  29. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/exporter/envimet.py +0 -0
  30. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/exporter/magicavoxel.py +0 -0
  31. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/exporter/obj.py +0 -0
  32. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/generator.py +0 -0
  33. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/geoprocessor/__init__.py +0 -0
  34. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/geoprocessor/grid.py +0 -0
  35. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/geoprocessor/mesh.py +0 -0
  36. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/geoprocessor/network.py +0 -0
  37. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/geoprocessor/polygon.py +0 -0
  38. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/geoprocessor/utils.py +0 -0
  39. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/simulator/__init__.py +0 -0
  40. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/simulator/solar.py +0 -0
  41. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/simulator/utils.py +0 -0
  42. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/simulator/view.py +0 -0
  43. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/utils/__init__.py +0 -0
  44. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/utils/lc.py +0 -0
  45. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/utils/material.py +0 -0
  46. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/utils/visualization.py +0 -0
  47. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity/utils/weather.py +0 -0
  48. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity.egg-info/SOURCES.txt +0 -0
  49. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity.egg-info/dependency_links.txt +0 -0
  50. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity.egg-info/requires.txt +0 -0
  51. {voxcity-0.5.28 → voxcity-0.5.29}/src/voxcity.egg-info/top_level.txt +0 -0
  52. {voxcity-0.5.28 → voxcity-0.5.29}/tests/__init__.py +0 -0
  53. {voxcity-0.5.28 → voxcity-0.5.29}/tests/voxelcity.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voxcity
3
- Version: 0.5.28
3
+ Version: 0.5.29
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.5.28"
3
+ version = "0.5.29"
4
4
  requires-python = ">=3.10,<3.13"
5
5
  classifiers = [
6
6
  "Programming Language :: Python :: 3.10",
@@ -513,7 +513,12 @@ def draw_additional_buildings(building_gdf=None, initial_center=None, zoom=17):
513
513
  Args:
514
514
  building_gdf (GeoDataFrame, optional): Existing building footprints to display.
515
515
  If None, creates a new empty GeoDataFrame.
516
- Must have 'geometry' column and optionally 'height' column.
516
+ Expected columns: ['id', 'height', 'min_height', 'geometry', 'building_id']
517
+ - 'id': Integer ID from data sources (e.g., OSM building id)
518
+ - 'height': Building height in meters (set by user input)
519
+ - 'min_height': Minimum height in meters (defaults to 0.0)
520
+ - 'geometry': Building footprint polygon
521
+ - 'building_id': Unique building identifier
517
522
  initial_center (tuple, optional): Initial map center as (lon, lat).
518
523
  If None, centers on existing buildings or defaults to (-100, 40).
519
524
  zoom (int): Initial zoom level (default=17).
@@ -534,16 +539,21 @@ def draw_additional_buildings(building_gdf=None, initial_center=None, zoom=17):
534
539
  if building_gdf is None:
535
540
  # Create empty GeoDataFrame with required columns
536
541
  updated_gdf = gpd.GeoDataFrame(
537
- columns=['geometry', 'height', 'building_id'],
542
+ columns=['id', 'height', 'min_height', 'geometry', 'building_id'],
538
543
  crs='EPSG:4326'
539
544
  )
540
545
  else:
541
546
  # Make a copy to avoid modifying the original
542
547
  updated_gdf = building_gdf.copy()
548
+ # Ensure all required columns exist
543
549
  if 'height' not in updated_gdf.columns:
544
550
  updated_gdf['height'] = 10.0 # Default height
551
+ if 'min_height' not in updated_gdf.columns:
552
+ updated_gdf['min_height'] = 0.0 # Default min_height
545
553
  if 'building_id' not in updated_gdf.columns:
546
554
  updated_gdf['building_id'] = range(len(updated_gdf))
555
+ if 'id' not in updated_gdf.columns:
556
+ updated_gdf['id'] = range(len(updated_gdf))
547
557
 
548
558
  # Determine map center
549
559
  if initial_center is not None:
@@ -567,14 +577,19 @@ def draw_additional_buildings(building_gdf=None, initial_center=None, zoom=17):
567
577
  lat_lon_coords = [(c[1], c[0]) for c in coords[:-1]]
568
578
 
569
579
  height = row.get('height', 10.0)
580
+ min_height = row.get('min_height', 0.0)
581
+ building_id = row.get('building_id', idx)
582
+ bldg_id = row.get('id', idx)
570
583
  bldg_layer = LeafletPolygon(
571
584
  locations=lat_lon_coords,
572
585
  color="blue",
573
586
  fill_color="blue",
574
587
  fill_opacity=0.3,
575
588
  weight=2,
576
- popup=HTML(f"<b>Building ID:</b> {row.get('building_id', idx)}<br>"
577
- f"<b>Height:</b> {height}m")
589
+ popup=HTML(f"<b>Building ID:</b> {building_id}<br>"
590
+ f"<b>ID:</b> {bldg_id}<br>"
591
+ f"<b>Height:</b> {height}m<br>"
592
+ f"<b>Min Height:</b> {min_height}m")
578
593
  )
579
594
  m.add_layer(bldg_layer)
580
595
  building_layers[idx] = bldg_layer
@@ -664,17 +679,21 @@ def draw_additional_buildings(building_gdf=None, initial_center=None, zoom=17):
664
679
  # Create polygon geometry
665
680
  polygon = geom.Polygon(current_polygon['vertices'])
666
681
 
667
- # Get next building ID
682
+ # Get next building ID and ID values (ensure uniqueness)
668
683
  if len(updated_gdf) > 0:
669
- next_id = int(updated_gdf['building_id'].max() + 1)
684
+ next_building_id = int(updated_gdf['building_id'].max() + 1)
685
+ next_id = int(updated_gdf['id'].max() + 1)
670
686
  else:
687
+ next_building_id = 1
671
688
  next_id = 1
672
689
 
673
690
  # Create new row data
674
691
  new_row_data = {
675
692
  'geometry': polygon,
676
693
  'height': float(height_input.value),
677
- 'building_id': next_id
694
+ 'min_height': 0.0, # Default value as requested
695
+ 'building_id': next_building_id,
696
+ 'id': next_id
678
697
  }
679
698
 
680
699
  # Add any additional columns
@@ -696,8 +715,10 @@ def draw_additional_buildings(building_gdf=None, initial_center=None, zoom=17):
696
715
  fill_color="blue",
697
716
  fill_opacity=0.3,
698
717
  weight=2,
699
- popup=HTML(f"<b>Building ID:</b> {next_id}<br>"
700
- f"<b>Height:</b> {height_input.value}m")
718
+ popup=HTML(f"<b>Building ID:</b> {next_building_id}<br>"
719
+ f"<b>ID:</b> {next_id}<br>"
720
+ f"<b>Height:</b> {height_input.value}m<br>"
721
+ f"<b>Min Height:</b> 0.0m")
701
722
  )
702
723
  m.add_layer(new_layer)
703
724
 
@@ -707,8 +728,8 @@ def draw_additional_buildings(building_gdf=None, initial_center=None, zoom=17):
707
728
  add_button.disabled = True
708
729
  clear_button.disabled = True
709
730
 
710
- print(f"Building {next_id} added successfully!")
711
- print(f"Height: {height_input.value}m")
731
+ print(f"Building {next_building_id} added successfully!")
732
+ print(f"ID: {next_id}, Height: {height_input.value}m, Min Height: 0.0m")
712
733
  print(f"Total buildings: {len(updated_gdf)}")
713
734
 
714
735
  def clear_drawing_click(b):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voxcity
3
- Version: 0.5.28
3
+ Version: 0.5.29
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