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.
- {voxcity-0.6.24 → voxcity-0.6.25}/PKG-INFO +1 -1
- {voxcity-0.6.24 → voxcity-0.6.25}/pyproject.toml +1 -1
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/exporter/cityles.py +95 -76
- {voxcity-0.6.24 → voxcity-0.6.25}/AUTHORS.rst +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/LICENSE +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/README.md +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/__init__.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/downloader/__init__.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/downloader/citygml.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/downloader/eubucco.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/downloader/gee.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/downloader/mbfp.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/downloader/oemj.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/downloader/osm.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/downloader/overture.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/downloader/utils.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/exporter/__init__.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/exporter/envimet.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/exporter/magicavoxel.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/exporter/netcdf.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/exporter/obj.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/generator.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/geoprocessor/__init__.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/geoprocessor/draw.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/geoprocessor/grid.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/geoprocessor/mesh.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/geoprocessor/network.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/geoprocessor/polygon.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/geoprocessor/utils.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/simulator/__init__.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/simulator/solar.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/simulator/utils.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/simulator/view.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/utils/__init__.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/utils/lc.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/utils/material.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/utils/visualization.py +0 -0
- {voxcity-0.6.24 → voxcity-0.6.25}/src/voxcity/utils/weather.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "voxcity"
|
|
3
|
-
version = "0.6.
|
|
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
|
|
40
|
-
#
|
|
41
|
-
|
|
42
|
-
#
|
|
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':
|
|
45
|
-
'Rangeland':
|
|
46
|
-
'Shrub':
|
|
47
|
-
'Moss and lichen':
|
|
48
|
-
'Agriculture land':
|
|
49
|
-
'Tree':
|
|
50
|
-
'Wet land':
|
|
51
|
-
'Mangroves':
|
|
52
|
-
'Water':
|
|
53
|
-
'Snow and ice':
|
|
54
|
-
'Developed space':
|
|
55
|
-
'Road':
|
|
56
|
-
'Building':
|
|
57
|
-
'No Data':
|
|
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':
|
|
63
|
-
'Road':
|
|
64
|
-
'Parking Lot':
|
|
65
|
-
'Tree Canopy':
|
|
66
|
-
'Grass/Shrub':
|
|
67
|
-
'Agriculture':
|
|
68
|
-
'Water':
|
|
69
|
-
'Barren':
|
|
70
|
-
'Unknown':
|
|
71
|
-
'Sea':
|
|
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':
|
|
77
|
-
'Rangeland':
|
|
78
|
-
'Developed space':
|
|
79
|
-
'Road':
|
|
80
|
-
'Tree':
|
|
81
|
-
'Water':
|
|
82
|
-
'Agriculture land':
|
|
83
|
-
'Building':
|
|
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':
|
|
89
|
-
'Shrubland':
|
|
90
|
-
'Grassland':
|
|
91
|
-
'Cropland':
|
|
92
|
-
'Built-up':
|
|
93
|
-
'Barren / sparse vegetation':
|
|
94
|
-
'Snow and ice':
|
|
95
|
-
'Open water':
|
|
96
|
-
'Herbaceous wetland':
|
|
97
|
-
'Mangroves':
|
|
98
|
-
'Moss and lichen':
|
|
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':
|
|
104
|
-
'Water':
|
|
105
|
-
'Trees':
|
|
106
|
-
'Grass':
|
|
107
|
-
'Flooded Vegetation':
|
|
108
|
-
'Crops':
|
|
109
|
-
'Scrub/Shrub':
|
|
110
|
-
'Built Area':
|
|
111
|
-
'Bare Ground':
|
|
112
|
-
'Snow/Ice':
|
|
113
|
-
'Clouds':
|
|
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':
|
|
119
|
-
'Trees':
|
|
120
|
-
'Grass':
|
|
121
|
-
'Flooded Vegetation':
|
|
122
|
-
'Crops':
|
|
123
|
-
'Shrub and Scrub':
|
|
124
|
-
'Built':
|
|
125
|
-
'Bare':
|
|
126
|
-
'Snow and Ice':
|
|
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
|
|
135
|
+
# Building material mapping based on corrected definitions (101-117)
|
|
130
136
|
BUILDING_MATERIAL_MAPPING = {
|
|
131
|
-
'building':
|
|
132
|
-
'concrete':
|
|
133
|
-
'residential':
|
|
134
|
-
'wooden':
|
|
135
|
-
'commercial':
|
|
136
|
-
'industrial':
|
|
137
|
-
'default':
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|