voxcity 0.6.24__tar.gz → 0.6.25__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 (38) hide show
  1. {voxcity-0.6.24 → voxcity-0.6.25}/PKG-INFO +1 -1
  2. {voxcity-0.6.24 → voxcity-0.6.25}/pyproject.toml +1 -1
  3. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/exporter/cityles.py +95 -76
  4. {voxcity-0.6.24 → voxcity-0.6.25}/AUTHORS.rst +0 -0
  5. {voxcity-0.6.24 → voxcity-0.6.25}/LICENSE +0 -0
  6. {voxcity-0.6.24 → voxcity-0.6.25}/README.md +0 -0
  7. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/__init__.py +0 -0
  8. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/downloader/__init__.py +0 -0
  9. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/downloader/citygml.py +0 -0
  10. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/downloader/eubucco.py +0 -0
  11. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/downloader/gee.py +0 -0
  12. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/downloader/mbfp.py +0 -0
  13. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/downloader/oemj.py +0 -0
  14. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/downloader/osm.py +0 -0
  15. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/downloader/overture.py +0 -0
  16. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/downloader/utils.py +0 -0
  17. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/exporter/__init__.py +0 -0
  18. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/exporter/envimet.py +0 -0
  19. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/exporter/magicavoxel.py +0 -0
  20. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/exporter/netcdf.py +0 -0
  21. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/exporter/obj.py +0 -0
  22. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/generator.py +0 -0
  23. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/geoprocessor/__init__.py +0 -0
  24. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/geoprocessor/draw.py +0 -0
  25. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/geoprocessor/grid.py +0 -0
  26. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/geoprocessor/mesh.py +0 -0
  27. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/geoprocessor/network.py +0 -0
  28. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/geoprocessor/polygon.py +0 -0
  29. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/geoprocessor/utils.py +0 -0
  30. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/simulator/__init__.py +0 -0
  31. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/simulator/solar.py +0 -0
  32. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/simulator/utils.py +0 -0
  33. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/simulator/view.py +0 -0
  34. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/utils/__init__.py +0 -0
  35. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/utils/lc.py +0 -0
  36. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/utils/material.py +0 -0
  37. {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/utils/visualization.py +0 -0
  38. {voxcity-0.6.24 → voxcity-0.6.25}/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.24
3
+ Version: 0.6.25
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
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "voxcity"
3
- version = "0.6.24"
3
+ version = "0.6.25"
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"
@@ -36,107 +36,126 @@ VOXCITY_STANDARD_CLASSES = {
36
36
  }
37
37
 
38
38
  ## Source-specific class name to CityLES land use mappings
39
- # CityLES land use codes: 1=Water, 2=Rice Paddy, 3=Crops, 4=Grassland, 5=Deciduous Broadleaf Forest,
40
- # 9=Bare Land, 10=Building, 16=Asphalt (road), etc.
41
-
42
- # OpenStreetMap / Standard
39
+ # CityLES land use codes (updated to match provided definitions):
40
+ # 1: High reflective ASPHALT, 2: High reflective ASPHALT without AH,
41
+ # 3: CONCRETE (proxy of jari), 4: CONCRETE building,
42
+ # 5: Slate roof (Ordinal wooden house), 6: PADDY,
43
+ # 7: Dryland Cropland and Pasture, 8: Barren or Sparsely Vegetated,
44
+ # 9: WATER, 10: Grassland, 11: CONCRETE (proxy of block),
45
+ # 12: ASPHALT without AH, 13: ASPHALT,
46
+ # 14-17: Deciduous Broadleaf Forest
47
+
48
+ # OpenStreetMap / Standard (mapped to updated CityLES landuse codes)
43
49
  OSM_CLASS_TO_CITYLES = {
44
- 'Bareland': 9,
45
- 'Rangeland': 4,
46
- 'Shrub': 4,
47
- 'Moss and lichen': 4,
48
- 'Agriculture land': 3,
49
- 'Tree': 5,
50
- 'Wet land': 2,
51
- 'Mangroves': 5,
52
- 'Water': 1,
53
- 'Snow and ice': 9,
54
- 'Developed space': 10,
55
- 'Road': 16,
56
- 'Building': 10,
57
- 'No Data': 4
50
+ 'Bareland': 8,
51
+ 'Rangeland': 10,
52
+ 'Shrub': 10,
53
+ 'Moss and lichen': 10,
54
+ 'Agriculture land': 7,
55
+ 'Tree': 14,
56
+ 'Wet land': 6,
57
+ 'Mangroves': 14,
58
+ 'Water': 9,
59
+ 'Snow and ice': 8,
60
+ 'Developed space': 4,
61
+ 'Road': 13,
62
+ 'Building': 4,
63
+ 'No Data': 10
58
64
  }
59
65
 
60
66
  # Urbanwatch
61
67
  URBANWATCH_CLASS_TO_CITYLES = {
62
- 'Building': 10,
63
- 'Road': 16,
64
- 'Parking Lot': 16,
65
- 'Tree Canopy': 5,
66
- 'Grass/Shrub': 4,
67
- 'Agriculture': 3,
68
- 'Water': 1,
69
- 'Barren': 9,
70
- 'Unknown': 4,
71
- 'Sea': 1
68
+ 'Building': 4,
69
+ 'Road': 13,
70
+ 'Parking Lot': 13,
71
+ 'Tree Canopy': 14,
72
+ 'Grass/Shrub': 10,
73
+ 'Agriculture': 7,
74
+ 'Water': 9,
75
+ 'Barren': 8,
76
+ 'Unknown': 10,
77
+ 'Sea': 9
72
78
  }
73
79
 
74
80
  # OpenEarthMapJapan
75
81
  OEMJ_CLASS_TO_CITYLES = {
76
- 'Bareland': 9,
77
- 'Rangeland': 4,
78
- 'Developed space': 10,
79
- 'Road': 16,
80
- 'Tree': 5,
81
- 'Water': 1,
82
- 'Agriculture land': 3,
83
- 'Building': 10
82
+ 'Bareland': 8,
83
+ 'Rangeland': 10,
84
+ 'Developed space': 4,
85
+ 'Road': 13,
86
+ 'Tree': 14,
87
+ 'Water': 9,
88
+ 'Agriculture land': 7,
89
+ 'Building': 4
84
90
  }
85
91
 
86
92
  # ESA WorldCover
87
93
  ESA_CLASS_TO_CITYLES = {
88
- 'Trees': 5,
89
- 'Shrubland': 4,
90
- 'Grassland': 4,
91
- 'Cropland': 3,
92
- 'Built-up': 10,
93
- 'Barren / sparse vegetation': 9,
94
- 'Snow and ice': 9,
95
- 'Open water': 1,
96
- 'Herbaceous wetland': 2,
97
- 'Mangroves': 5,
98
- 'Moss and lichen': 9
94
+ 'Trees': 14,
95
+ 'Shrubland': 10,
96
+ 'Grassland': 10,
97
+ 'Cropland': 7,
98
+ 'Built-up': 4,
99
+ 'Barren / sparse vegetation': 8,
100
+ 'Snow and ice': 8,
101
+ 'Open water': 9,
102
+ 'Herbaceous wetland': 6,
103
+ 'Mangroves': 14,
104
+ 'Moss and lichen': 10
99
105
  }
100
106
 
101
107
  # ESRI 10m Annual Land Cover
102
108
  ESRI_CLASS_TO_CITYLES = {
103
- 'No Data': 4,
104
- 'Water': 1,
105
- 'Trees': 5,
106
- 'Grass': 4,
107
- 'Flooded Vegetation': 2,
108
- 'Crops': 3,
109
- 'Scrub/Shrub': 4,
110
- 'Built Area': 10,
111
- 'Bare Ground': 9,
112
- 'Snow/Ice': 9,
113
- 'Clouds': 4
109
+ 'No Data': 10,
110
+ 'Water': 9,
111
+ 'Trees': 14,
112
+ 'Grass': 10,
113
+ 'Flooded Vegetation': 6,
114
+ 'Crops': 7,
115
+ 'Scrub/Shrub': 10,
116
+ 'Built Area': 4,
117
+ 'Bare Ground': 8,
118
+ 'Snow/Ice': 8,
119
+ 'Clouds': 10
114
120
  }
115
121
 
116
122
  # Dynamic World V1
117
123
  DYNAMIC_WORLD_CLASS_TO_CITYLES = {
118
- 'Water': 1,
119
- 'Trees': 5,
120
- 'Grass': 4,
121
- 'Flooded Vegetation': 2,
122
- 'Crops': 3,
123
- 'Shrub and Scrub': 4,
124
- 'Built': 10,
125
- 'Bare': 9,
126
- 'Snow and Ice': 9
124
+ 'Water': 9,
125
+ 'Trees': 14,
126
+ 'Grass': 10,
127
+ 'Flooded Vegetation': 6,
128
+ 'Crops': 7,
129
+ 'Shrub and Scrub': 10,
130
+ 'Built': 4,
131
+ 'Bare': 8,
132
+ 'Snow and Ice': 8
127
133
  }
128
134
 
129
- # Building material mapping based on corrected documentation
135
+ # Building material mapping based on corrected definitions (101-117)
130
136
  BUILDING_MATERIAL_MAPPING = {
131
- 'building': 110, # Building (general)
132
- 'concrete': 110, # Building (concrete)
133
- 'residential': 111, # Old wooden house
134
- 'wooden': 111, # Old wooden house
135
- 'commercial': 110, # Building (commercial)
136
- 'industrial': 110, # Building (industrial)
137
- 'default': 110 # Default to general building
137
+ 'building': 104, # CONCRETE building
138
+ 'concrete': 104, # CONCRETE building
139
+ 'residential': 105, # Slate roof (Ordinal wooden house)
140
+ 'wooden': 105, # Slate roof (Ordinal wooden house)
141
+ 'commercial': 104, # CONCRETE building
142
+ 'industrial': 104, # CONCRETE building
143
+ 'default': 104 # Default to CONCRETE building
138
144
  }
139
145
 
146
+ # Helper to convert landuse code (1-17) to building material code (101-117)
147
+ def landuse_to_building_material_code(landuse_code: int) -> int:
148
+ """Map landuse code to building-material code with required adjustments.
149
+
150
+ The general rule is 100 + landuse_code, except for ASPHALT classes where
151
+ landuse 12 (ASPHALT without AH) maps to 113 and landuse 13 (ASPHALT) maps to 112.
152
+ """
153
+ # if landuse_code == 12:
154
+ # return 113
155
+ # if landuse_code == 13:
156
+ # return 112
157
+ return 100 + int(landuse_code)
158
+
140
159
  # Tree type mapping for vmap.txt
141
160
  TREE_TYPE_MAPPING = {
142
161
  'deciduous': 101, # Leaf
@@ -229,7 +248,7 @@ def export_topog(building_height_grid, building_id_grid, output_path,
229
248
  # Decide material code per cell
230
249
  if cityles_landuse_grid is not None:
231
250
  cell_lu = int(cityles_landuse_grid[j, i])
232
- material_code_cell = cell_lu + 100
251
+ material_code_cell = landuse_to_building_material_code(cell_lu)
233
252
  else:
234
253
  if height > 0:
235
254
  material_code_cell = material_code
File without changes
File without changes
File without changes