voxcity 0.6.25__py3-none-any.whl → 0.6.26__py3-none-any.whl
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.
- voxcity/exporter/cityles.py +76 -95
- {voxcity-0.6.25.dist-info → voxcity-0.6.26.dist-info}/METADATA +1 -1
- {voxcity-0.6.25.dist-info → voxcity-0.6.26.dist-info}/RECORD +6 -6
- {voxcity-0.6.25.dist-info → voxcity-0.6.26.dist-info}/WHEEL +0 -0
- {voxcity-0.6.25.dist-info → voxcity-0.6.26.dist-info}/licenses/AUTHORS.rst +0 -0
- {voxcity-0.6.25.dist-info → voxcity-0.6.26.dist-info}/licenses/LICENSE +0 -0
voxcity/exporter/cityles.py
CHANGED
|
@@ -36,126 +36,107 @@ 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
|
-
#
|
|
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)
|
|
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
|
|
49
43
|
OSM_CLASS_TO_CITYLES = {
|
|
50
|
-
'Bareland':
|
|
51
|
-
'Rangeland':
|
|
52
|
-
'Shrub':
|
|
53
|
-
'Moss and lichen':
|
|
54
|
-
'Agriculture land':
|
|
55
|
-
'Tree':
|
|
56
|
-
'Wet land':
|
|
57
|
-
'Mangroves':
|
|
58
|
-
'Water':
|
|
59
|
-
'Snow and ice':
|
|
60
|
-
'Developed space':
|
|
61
|
-
'Road':
|
|
62
|
-
'Building':
|
|
63
|
-
'No Data':
|
|
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
|
|
64
58
|
}
|
|
65
59
|
|
|
66
60
|
# Urbanwatch
|
|
67
61
|
URBANWATCH_CLASS_TO_CITYLES = {
|
|
68
|
-
'Building':
|
|
69
|
-
'Road':
|
|
70
|
-
'Parking Lot':
|
|
71
|
-
'Tree Canopy':
|
|
72
|
-
'Grass/Shrub':
|
|
73
|
-
'Agriculture':
|
|
74
|
-
'Water':
|
|
75
|
-
'Barren':
|
|
76
|
-
'Unknown':
|
|
77
|
-
'Sea':
|
|
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
|
|
78
72
|
}
|
|
79
73
|
|
|
80
74
|
# OpenEarthMapJapan
|
|
81
75
|
OEMJ_CLASS_TO_CITYLES = {
|
|
82
|
-
'Bareland':
|
|
83
|
-
'Rangeland':
|
|
84
|
-
'Developed space':
|
|
85
|
-
'Road':
|
|
86
|
-
'Tree':
|
|
87
|
-
'Water':
|
|
88
|
-
'Agriculture land':
|
|
89
|
-
'Building':
|
|
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
|
|
90
84
|
}
|
|
91
85
|
|
|
92
86
|
# ESA WorldCover
|
|
93
87
|
ESA_CLASS_TO_CITYLES = {
|
|
94
|
-
'Trees':
|
|
95
|
-
'Shrubland':
|
|
96
|
-
'Grassland':
|
|
97
|
-
'Cropland':
|
|
98
|
-
'Built-up':
|
|
99
|
-
'Barren / sparse vegetation':
|
|
100
|
-
'Snow and ice':
|
|
101
|
-
'Open water':
|
|
102
|
-
'Herbaceous wetland':
|
|
103
|
-
'Mangroves':
|
|
104
|
-
'Moss and lichen':
|
|
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
|
|
105
99
|
}
|
|
106
100
|
|
|
107
101
|
# ESRI 10m Annual Land Cover
|
|
108
102
|
ESRI_CLASS_TO_CITYLES = {
|
|
109
|
-
'No Data':
|
|
110
|
-
'Water':
|
|
111
|
-
'Trees':
|
|
112
|
-
'Grass':
|
|
113
|
-
'Flooded Vegetation':
|
|
114
|
-
'Crops':
|
|
115
|
-
'Scrub/Shrub':
|
|
116
|
-
'Built Area':
|
|
117
|
-
'Bare Ground':
|
|
118
|
-
'Snow/Ice':
|
|
119
|
-
'Clouds':
|
|
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
|
|
120
114
|
}
|
|
121
115
|
|
|
122
116
|
# Dynamic World V1
|
|
123
117
|
DYNAMIC_WORLD_CLASS_TO_CITYLES = {
|
|
124
|
-
'Water':
|
|
125
|
-
'Trees':
|
|
126
|
-
'Grass':
|
|
127
|
-
'Flooded Vegetation':
|
|
128
|
-
'Crops':
|
|
129
|
-
'Shrub and Scrub':
|
|
130
|
-
'Built':
|
|
131
|
-
'Bare':
|
|
132
|
-
'Snow and Ice':
|
|
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
|
|
133
127
|
}
|
|
134
128
|
|
|
135
|
-
# Building material mapping based on corrected
|
|
129
|
+
# Building material mapping based on corrected documentation
|
|
136
130
|
BUILDING_MATERIAL_MAPPING = {
|
|
137
|
-
'building':
|
|
138
|
-
'concrete':
|
|
139
|
-
'residential':
|
|
140
|
-
'wooden':
|
|
141
|
-
'commercial':
|
|
142
|
-
'industrial':
|
|
143
|
-
'default':
|
|
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
|
|
144
138
|
}
|
|
145
139
|
|
|
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
|
-
|
|
159
140
|
# Tree type mapping for vmap.txt
|
|
160
141
|
TREE_TYPE_MAPPING = {
|
|
161
142
|
'deciduous': 101, # Leaf
|
|
@@ -248,7 +229,7 @@ def export_topog(building_height_grid, building_id_grid, output_path,
|
|
|
248
229
|
# Decide material code per cell
|
|
249
230
|
if cityles_landuse_grid is not None:
|
|
250
231
|
cell_lu = int(cityles_landuse_grid[j, i])
|
|
251
|
-
material_code_cell =
|
|
232
|
+
material_code_cell = cell_lu + 100
|
|
252
233
|
else:
|
|
253
234
|
if height > 0:
|
|
254
235
|
material_code_cell = material_code
|
|
@@ -9,7 +9,7 @@ voxcity/downloader/osm.py,sha256=7Wo6lSodci7gALMKLQ_0ricmn0ZrfUK90vKYQ-ayU2A,462
|
|
|
9
9
|
voxcity/downloader/overture.py,sha256=hVxu-3Fmuu2E1tEzcDcNyU1cR-aE-6h6jkcxkuqN1-s,13343
|
|
10
10
|
voxcity/downloader/utils.py,sha256=tz6wt4B9BhEOyvoF5OYXlr8rUd5cBEDedWL3j__oT70,3099
|
|
11
11
|
voxcity/exporter/__init__.py,sha256=ikmRs3jGKvYTjpleiROfiCPYlwtqxwl1T6pk8pievQw,117
|
|
12
|
-
voxcity/exporter/cityles.py,sha256=
|
|
12
|
+
voxcity/exporter/cityles.py,sha256=Kfl2PAn4WquqCdjOlyPrHysxPLaudh8QfsoC6WAXlvs,18325
|
|
13
13
|
voxcity/exporter/envimet.py,sha256=Sh7s1JdQ6SgT_L2Xd_c4gtEGWK2hTS87bccaoIqik-s,31105
|
|
14
14
|
voxcity/exporter/magicavoxel.py,sha256=SfGEgTZRlossKx3Xrv9d3iKSX-HmfQJEL9lZHgWMDX4,12782
|
|
15
15
|
voxcity/exporter/netcdf.py,sha256=48rJ3wDsFhi9ANbElhMjXLxWMJoJzBt1gFbN0ekPp-A,7404
|
|
@@ -31,8 +31,8 @@ voxcity/utils/lc.py,sha256=722Gz3lPbgAp0mmTZ-g-QKBbAnbxrcgaYwb1sa7q8Sk,16189
|
|
|
31
31
|
voxcity/utils/material.py,sha256=H8K8Lq4wBL6dQtgj7esUW2U6wLCOTeOtelkTDJoRgMo,10007
|
|
32
32
|
voxcity/utils/visualization.py,sha256=V2JPKuZktAby90dhMHbR2XUeLETdW75hGTk7a9yfGow,121404
|
|
33
33
|
voxcity/utils/weather.py,sha256=cb6ZooL42Hc4214OtFiJ78cCgWYM6VE-DU8S3e-urRg,48449
|
|
34
|
-
voxcity-0.6.
|
|
35
|
-
voxcity-0.6.
|
|
36
|
-
voxcity-0.6.
|
|
37
|
-
voxcity-0.6.
|
|
38
|
-
voxcity-0.6.
|
|
34
|
+
voxcity-0.6.26.dist-info/licenses/AUTHORS.rst,sha256=m82vkI5QokEGdcHof2OxK39lf81w1P58kG9ZNNAKS9U,175
|
|
35
|
+
voxcity-0.6.26.dist-info/licenses/LICENSE,sha256=s_jE1Df1nTPL4A_5GCGic5Zwex0CVaPKcAmSilxJPPE,1089
|
|
36
|
+
voxcity-0.6.26.dist-info/METADATA,sha256=Ao99Ekv2nhc1GrMArHhtbr0psIS3erPuWf1WFlc3gHE,26227
|
|
37
|
+
voxcity-0.6.26.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
38
|
+
voxcity-0.6.26.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|