voxcity 0.6.5__tar.gz → 0.6.6__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 (37) hide show
  1. {voxcity-0.6.5 → voxcity-0.6.6}/PKG-INFO +1 -1
  2. {voxcity-0.6.5 → voxcity-0.6.6}/pyproject.toml +122 -95
  3. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/exporter/cityles.py +27 -6
  4. {voxcity-0.6.5 → voxcity-0.6.6}/AUTHORS.rst +0 -0
  5. {voxcity-0.6.5 → voxcity-0.6.6}/LICENSE +0 -0
  6. {voxcity-0.6.5 → voxcity-0.6.6}/README.md +0 -0
  7. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/__init__.py +0 -0
  8. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/downloader/__init__.py +0 -0
  9. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/downloader/citygml.py +0 -0
  10. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/downloader/eubucco.py +0 -0
  11. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/downloader/gee.py +0 -0
  12. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/downloader/mbfp.py +0 -0
  13. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/downloader/oemj.py +0 -0
  14. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/downloader/osm.py +0 -0
  15. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/downloader/overture.py +0 -0
  16. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/downloader/utils.py +0 -0
  17. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/exporter/__init__.py +0 -0
  18. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/exporter/envimet.py +0 -0
  19. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/exporter/magicavoxel.py +0 -0
  20. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/exporter/obj.py +0 -0
  21. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/generator.py +0 -0
  22. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/geoprocessor/__init__.py +0 -0
  23. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/geoprocessor/draw.py +0 -0
  24. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/geoprocessor/grid.py +0 -0
  25. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/geoprocessor/mesh.py +0 -0
  26. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/geoprocessor/network.py +0 -0
  27. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/geoprocessor/polygon.py +0 -0
  28. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/geoprocessor/utils.py +0 -0
  29. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/simulator/__init__.py +0 -0
  30. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/simulator/solar.py +0 -0
  31. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/simulator/utils.py +0 -0
  32. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/simulator/view.py +0 -0
  33. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/utils/__init__.py +0 -0
  34. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/utils/lc.py +0 -0
  35. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/utils/material.py +0 -0
  36. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/utils/visualization.py +0 -0
  37. {voxcity-0.6.5 → voxcity-0.6.6}/src/voxcity/utils/weather.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: voxcity
3
- Version: 0.6.5
3
+ Version: 0.6.6
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
  Author: Kunihiko Fujiwara
@@ -1,96 +1,123 @@
1
- [tool.poetry]
2
- name = "voxcity"
3
- version = "0.6.5"
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
- readme = "README.md"
6
- license = "MIT"
7
- authors = ["Kunihiko Fujiwara <fujiwara.kunihiko@takenaka.co.jp>"]
8
- maintainers = ["Kunihiko Fujiwara <fujiwara.kunihiko@takenaka.co.jp>"]
9
- requires-python = ">=3.10,<3.13"
10
- classifiers = [
11
- "Programming Language :: Python :: 3.10",
12
- "Programming Language :: Python :: 3.11",
13
- "Programming Language :: Python :: 3.12",
14
- ]
15
- packages = [
16
- {include = "voxcity", from = "src"}
17
- ]
18
-
19
- [tool.poetry.dependencies]
20
- python = ">=3.10,<3.13"
21
- typer = "*"
22
- pandas = "*"
23
- requests = "*"
24
- pyproj = "*"
25
- ipyleaflet = "*"
26
- geopandas = "*"
27
- rasterio = "1.3.11"
28
- shapely = "*"
29
- gdown = "*"
30
- numpy = "*"
31
- matplotlib = "*"
32
- contextily = "*"
33
- fiona = "*"
34
- rtree = "*"
35
- plotly = "*"
36
- tqdm = "*"
37
- scipy = "*"
38
- affine = "*"
39
- earthengine-api = "*"
40
- geemap = "*"
41
- rio-cogeo = "*"
42
- geopy = "*"
43
- py-vox-io = "*"
44
- numba = "*"
45
- reverse_geocoder = "*"
46
- pycountry = "*"
47
- seaborn = "*"
48
- overturemaps = "*"
49
- protobuf = "*"
50
- timezonefinder = "*"
51
- astral = "*"
52
- osmnx = "*"
53
- joblib = "*"
54
- trimesh = "*"
55
- pyvista = "*"
56
- IPython = "*"
57
- lxml = "*"
58
- scikit-learn = "*"
59
-
60
- [tool.poetry.group.dev.dependencies]
61
- coverage = "*"
62
- mypy = "*"
63
- pytest = "*"
64
- ruff = "*"
65
-
66
- [tool.poetry.urls]
67
- bugs = "https://github.com/kunifujiwara/voxcity/issues"
68
- changelog = "https://github.com/kunifujiwara/voxcity/blob/master/changelog.md"
69
- homepage = "https://github.com/kunifujiwara/voxcity"
70
-
71
- [tool.setuptools]
72
- package-dir = {"" = "src"}
73
-
74
- [tool.mypy]
75
- files = "."
76
- strict = true
77
- warn_unreachable = true
78
- warn_no_return = true
79
-
80
- [[tool.mypy.overrides]]
81
- module = "tests.*"
82
- allow_untyped_defs = true
83
- disable_error_code = "attr-defined"
84
-
85
- [tool.pytest.ini_options]
86
- markers = [
87
- "slow: marks tests as slow (deselect with '-m \"not slow\"')",
88
- "integration: marks tests as integration tests",
89
- "gee: marks tests that require Google Earth Engine authentication",
90
- ]
91
- addopts = "-v --tb=short"
92
- testpaths = ["tests"]
93
-
94
- [build-system]
95
- requires = ["poetry-core>=1.0.0"]
1
+ [tool.poetry]
2
+ name = "voxcity"
3
+ version = "0.6.6"
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
+ readme = "README.md"
6
+ license = "MIT"
7
+ authors = ["Kunihiko Fujiwara <fujiwara.kunihiko@takenaka.co.jp>"]
8
+ maintainers = ["Kunihiko Fujiwara <fujiwara.kunihiko@takenaka.co.jp>"]
9
+ requires-python = ">=3.10,<3.13"
10
+ classifiers = [
11
+ "Programming Language :: Python :: 3.10",
12
+ "Programming Language :: Python :: 3.11",
13
+ "Programming Language :: Python :: 3.12",
14
+ ]
15
+ packages = [
16
+ {include = "voxcity", from = "src"}
17
+ ]
18
+
19
+ [tool.poetry.dependencies]
20
+ python = ">=3.10,<3.13"
21
+ typer = "*"
22
+ pandas = "*"
23
+ requests = "*"
24
+ pyproj = "*"
25
+ ipyleaflet = "*"
26
+ geopandas = "*"
27
+ rasterio = "1.3.11"
28
+ shapely = "*"
29
+ gdown = "*"
30
+ numpy = "*"
31
+ matplotlib = "*"
32
+ contextily = "*"
33
+ fiona = "*"
34
+ rtree = "*"
35
+ plotly = "*"
36
+ tqdm = "*"
37
+ scipy = "*"
38
+ affine = "*"
39
+ earthengine-api = "*"
40
+ geemap = "*"
41
+ rio-cogeo = "*"
42
+ geopy = "*"
43
+ py-vox-io = "*"
44
+ numba = "*"
45
+ reverse_geocoder = "*"
46
+ pycountry = "*"
47
+ seaborn = "*"
48
+ overturemaps = "*"
49
+ protobuf = "*"
50
+ timezonefinder = "*"
51
+ astral = "*"
52
+ osmnx = "*"
53
+ joblib = "*"
54
+ trimesh = "*"
55
+ pyvista = "*"
56
+ IPython = "*"
57
+ lxml = "*"
58
+ scikit-learn = "*"
59
+
60
+ [tool.poetry.group.dev.dependencies]
61
+ coverage = "*"
62
+ mypy = "*"
63
+ pytest = "*"
64
+ ruff = "*"
65
+
66
+ [tool.poetry.urls]
67
+ bugs = "https://github.com/kunifujiwara/voxcity/issues"
68
+ changelog = "https://github.com/kunifujiwara/voxcity/blob/master/changelog.md"
69
+ homepage = "https://github.com/kunifujiwara/voxcity"
70
+
71
+ [tool.setuptools]
72
+ package-dir = {"" = "src"}
73
+
74
+ [tool.mypy]
75
+ files = "."
76
+ strict = true
77
+ warn_unreachable = true
78
+ warn_no_return = true
79
+
80
+ [[tool.mypy.overrides]]
81
+ module = "tests.*"
82
+ allow_untyped_defs = true
83
+ disable_error_code = "attr-defined"
84
+
85
+ [tool.pytest.ini_options]
86
+ markers = [
87
+ "slow: marks tests as slow (deselect with '-m \"not slow\"')",
88
+ "integration: marks tests as integration tests",
89
+ "gee: marks tests that require Google Earth Engine authentication",
90
+ ]
91
+ addopts = "-v --tb=short"
92
+ testpaths = ["tests"]
93
+
94
+ [tool.coverage.run]
95
+ branch = true
96
+ source = ["src/voxcity"]
97
+ omit = [
98
+ # Visualization and I/O heavy modules (non-deterministic / GUI)
99
+ "src/voxcity/utils/visualization.py",
100
+ # External data/network heavy downloaders
101
+ "src/voxcity/downloader/gee.py",
102
+ "src/voxcity/downloader/mbfp.py",
103
+ "src/voxcity/downloader/oemj.py",
104
+ "src/voxcity/downloader/overture.py",
105
+ "src/voxcity/downloader/citygml.py",
106
+ # Pure exporters (file writers) not critical for algorithmic coverage
107
+ "src/voxcity/exporter/*",
108
+ ]
109
+
110
+ [tool.coverage.report]
111
+ show_missing = true
112
+ skip_covered = false
113
+ exclude_lines = [
114
+ "pragma: no cover",
115
+ "def __repr__",
116
+ "if __name__ == .__main__.:",
117
+ "raise NotImplementedError",
118
+ "pass",
119
+ ]
120
+
121
+ [build-system]
122
+ requires = ["poetry-core>=1.0.0"]
96
123
  build-backend = "poetry.core.masonry.api"
@@ -190,7 +190,7 @@ def _build_index_to_cityles_map(land_cover_source):
190
190
 
191
191
 
192
192
  def export_topog(building_height_grid, building_id_grid, output_path,
193
- building_material='default'):
193
+ building_material='default', cityles_landuse_grid=None):
194
194
  """
195
195
  Export topog.txt file for CityLES
196
196
 
@@ -226,8 +226,17 @@ def export_topog(building_height_grid, building_id_grid, output_path,
226
226
  i_1based = i + 1
227
227
  j_1based = j + 1
228
228
  height = float(building_height_grid[j, i])
229
+ # Decide material code per cell
230
+ if cityles_landuse_grid is not None:
231
+ cell_lu = int(cityles_landuse_grid[j, i])
232
+ material_code_cell = cell_lu + 100
233
+ else:
234
+ if height > 0:
235
+ material_code_cell = material_code
236
+ else:
237
+ material_code_cell = 102
229
238
  # Format: i j height material_code depth1 depth2 changed_material
230
- f.write(f"{i_1based} {j_1based} {height:.1f} {material_code} 0.0 0.0 102\n")
239
+ f.write(f"{i_1based} {j_1based} {height:.1f} {material_code_cell} 0.0 0.0 102\n")
231
240
 
232
241
 
233
242
  def export_landuse(land_cover_grid, output_path, land_cover_source=None):
@@ -254,6 +263,8 @@ def export_landuse(land_cover_grid, output_path, land_cover_source=None):
254
263
 
255
264
  # Create mapping statistics
256
265
  mapping_stats = {}
266
+ # Prepare grid to return
267
+ cityles_landuse_grid = np.zeros((ny, nx), dtype=int)
257
268
 
258
269
  with open(filename, 'w') as f:
259
270
  # Write in row-major order (j varies first, then i)
@@ -263,6 +274,8 @@ def export_landuse(land_cover_grid, output_path, land_cover_source=None):
263
274
  cityles_code = index_to_code.get(idx, 4)
264
275
  f.write(f"{cityles_code}\n")
265
276
 
277
+ cityles_landuse_grid[j, i] = cityles_code
278
+
266
279
  # Track mapping statistics
267
280
  if idx not in mapping_stats:
268
281
  mapping_stats[idx] = {'cityles_code': cityles_code, 'count': 0}
@@ -277,6 +290,8 @@ def export_landuse(land_cover_grid, output_path, land_cover_source=None):
277
290
  class_name = class_names[idx] if 0 <= idx < len(class_names) else 'Unknown'
278
291
  print(f" {idx}: {class_name} -> CityLES {stats['cityles_code']}: "
279
292
  f"{stats['count']} cells ({percentage:.1f}%)")
293
+
294
+ return cityles_landuse_grid
280
295
 
281
296
 
282
297
  def export_dem(dem_grid, output_path):
@@ -434,11 +449,17 @@ def export_cityles(building_height_grid, building_id_grid, canopy_height_grid,
434
449
  print(f"Land cover source: {land_cover_source}")
435
450
 
436
451
  # Export individual files
437
- print("\nExporting topog.txt...")
438
- export_topog(building_height_grid, building_id_grid, output_path, building_material)
439
-
440
452
  print("\nExporting landuse.txt...")
441
- export_landuse(land_cover_grid, output_path, land_cover_source)
453
+ cityles_landuse_grid = export_landuse(land_cover_grid, output_path, land_cover_source)
454
+
455
+ print("\nExporting topog.txt...")
456
+ export_topog(
457
+ building_height_grid,
458
+ building_id_grid,
459
+ output_path,
460
+ building_material,
461
+ cityles_landuse_grid=cityles_landuse_grid,
462
+ )
442
463
 
443
464
  print("\nExporting dem.txt...")
444
465
  export_dem(dem_grid, output_path)
File without changes
File without changes
File without changes
File without changes
File without changes