voxcity 0.6.2__py3-none-any.whl → 0.6.4__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.

Potentially problematic release.


This version of voxcity might be problematic. Click here for more details.

@@ -1654,7 +1654,8 @@ def visualize_numerical_grid_on_basemap(grid, rectangle_vertices, meshsize, valu
1654
1654
 
1655
1655
  def visualize_numerical_gdf_on_basemap(gdf, value_name="value", cmap='viridis', vmin=None, vmax=None,
1656
1656
  alpha=0.6, figsize=(12, 8), basemap='CartoDB light',
1657
- show_edge=False, edge_color='black', edge_width=0.5):
1657
+ show_edge=False, edge_color='black', edge_width=0.5,
1658
+ input_crs=None):
1658
1659
  """Visualizes a GeoDataFrame with numerical values on a basemap.
1659
1660
 
1660
1661
  Args:
@@ -1669,9 +1670,34 @@ def visualize_numerical_gdf_on_basemap(gdf, value_name="value", cmap='viridis',
1669
1670
  show_edge: Whether to show cell edges (default: False)
1670
1671
  edge_color: Color of cell edges (default: 'black')
1671
1672
  edge_width: Width of cell edges (default: 0.5)
1673
+ input_crs: Optional CRS to assign if the GeoDataFrame has no CRS. If not provided
1674
+ and CRS is missing, the function will attempt to infer WGS84 (EPSG:4326)
1675
+ when coordinates look like lon/lat; otherwise it will raise a clear error.
1672
1676
  """
1677
+ # Ensure CRS is defined; if missing, assign or infer
1678
+ if gdf.crs is None:
1679
+ if input_crs is not None:
1680
+ gdf = gdf.set_crs(input_crs, allow_override=True)
1681
+ else:
1682
+ # Try to infer WGS84 if bounds look like lon/lat
1683
+ try:
1684
+ minx, miny, maxx, maxy = gdf.total_bounds
1685
+ looks_like_lonlat = (
1686
+ -180.0 <= minx <= 180.0 and -180.0 <= maxx <= 180.0 and
1687
+ -90.0 <= miny <= 90.0 and -90.0 <= maxy <= 90.0
1688
+ )
1689
+ except Exception:
1690
+ looks_like_lonlat = False
1691
+ if looks_like_lonlat:
1692
+ gdf = gdf.set_crs("EPSG:4326", allow_override=True)
1693
+ else:
1694
+ raise ValueError(
1695
+ "Input GeoDataFrame has no CRS. Provide 'input_crs' (e.g., 'EPSG:4326' or 'EPSG:XXXX') "
1696
+ "or set gdf.crs before calling visualize_numerical_gdf_on_basemap."
1697
+ )
1698
+
1673
1699
  # Convert to Web Mercator if not already in that CRS
1674
- if gdf.crs != 'EPSG:3857':
1700
+ if str(gdf.crs) != 'EPSG:3857':
1675
1701
  gdf_web = gdf.to_crs(epsg=3857)
1676
1702
  else:
1677
1703
  gdf_web = gdf
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voxcity
3
- Version: 0.6.2
3
+ Version: 0.6.4
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
- Author-email: Kunihiko Fujiwara <kunihiko@nus.edu.sg>
6
- Maintainer-email: Kunihiko Fujiwara <kunihiko@nus.edu.sg>
5
+ Author-email: Kunihiko Fujiwara <fujiwara.kunihiko@takenaka.co.jp>
6
+ Maintainer-email: Kunihiko Fujiwara <fujiwara.kunihiko@takenaka.co.jp>
7
7
  License: MIT
8
8
  Project-URL: bugs, https://github.com/kunifujiwara/voxcity/issues
9
9
  Project-URL: changelog, https://github.com/kunifujiwara/voxcity/blob/master/changelog.md
@@ -1,38 +1,38 @@
1
1
  voxcity/__init__.py,sha256=el9v3gfybHOF_GUYPeSOqN0-vCrTW0eU1mcvi0sEfeU,252
2
- voxcity/generator.py,sha256=9jZuhkcK0yJI347LETUDjd_SsxsMcvbx3DUF-uIyp98,54683
2
+ voxcity/generator.py,sha256=J61i6-bvgOlNQWgxlkSvOZ7CLAjRgh_XRYwslWkKxVM,55756
3
3
  voxcity/downloader/__init__.py,sha256=o_T_EU7hZLGyXxX9wVWn1x-OAa3ThGYdnpgB1_2v3AE,151
4
4
  voxcity/downloader/citygml.py,sha256=jVeHCLlJTf7k55OQGX0lZGQAngz_DD2V5TldSqRFlvc,36024
5
5
  voxcity/downloader/eubucco.py,sha256=ln1YNaaOgJfxNfCtVbYaMm775-bUvpAA_LDv60_i22w,17875
6
- voxcity/downloader/gee.py,sha256=O6HhQnUUumg_tTm4pP_cuyu5YjupDA1uKFxZWxD-i2E,23205
6
+ voxcity/downloader/gee.py,sha256=nvJvYqcSZyyontRtG2cFeb__ZJfeY4rRN1NBPORxLwQ,23557
7
7
  voxcity/downloader/mbfp.py,sha256=UXDVjsO0fnb0fSal9yqrSFEIBThnRmnutnp08kZTmCA,6595
8
8
  voxcity/downloader/oemj.py,sha256=iDacTpiqn7RAXuqyEtHP29m0Cycwta5sMy9-GdvX3Fg,12293
9
9
  voxcity/downloader/osm.py,sha256=9nOVcVE50N76F5uquJbNIFr8Xajff4ac2Uj2oSGcFrc,42591
10
10
  voxcity/downloader/overture.py,sha256=4YG2DMwUSSyZKUw_o8cGhMmAkPJon82aPqOFBvrre-Y,11987
11
11
  voxcity/downloader/utils.py,sha256=tz6wt4B9BhEOyvoF5OYXlr8rUd5cBEDedWL3j__oT70,3099
12
12
  voxcity/exporter/__init__.py,sha256=dvyWJ184Eik9tFc0VviGbzTQzZi7O0JNyrqi_n39pVI,94
13
- voxcity/exporter/cityles.py,sha256=zp119kSfsmwReCv6hJEonzPL3vxKZBk6LxD0NUk_j1E,12978
13
+ voxcity/exporter/cityles.py,sha256=Xjq9h3jLfZB3BuVHLTWo-9Jtpj9k4G2I0mrv3_zyPZM,16542
14
14
  voxcity/exporter/envimet.py,sha256=Sh7s1JdQ6SgT_L2Xd_c4gtEGWK2hTS87bccaoIqik-s,31105
15
15
  voxcity/exporter/magicavoxel.py,sha256=SfGEgTZRlossKx3Xrv9d3iKSX-HmfQJEL9lZHgWMDX4,12782
16
16
  voxcity/exporter/obj.py,sha256=h1_aInpemcsu96fSTwjKMqX2VZAFYbZbElWd4M1ogyI,27973
17
17
  voxcity/geoprocessor/__init__.py,sha256=JzPVhhttxBWvaZ0IGX2w7OWL5bCo_TIvpHefWeNXruA,133
18
18
  voxcity/geoprocessor/draw.py,sha256=avXQwbGQWG3ZPPI8mwy0YN0K_aG4NMBdXI0vDg7yad0,35837
19
19
  voxcity/geoprocessor/grid.py,sha256=wrlOsX8cD0W5xCnOS5IOHy8DNqDGTM1I2270eVs787c,70602
20
- voxcity/geoprocessor/mesh.py,sha256=-r_3EGL3PZr-QngMOXrwKllYA4o0moDj0-bZvU0mlOo,31237
20
+ voxcity/geoprocessor/mesh.py,sha256=A7uaCMWfm82KEoYPfQYpxv6xMtQKaU2PBVDfKTpngqg,32027
21
21
  voxcity/geoprocessor/network.py,sha256=YynqR0nq_NUra_cQ3Z_56KxfRia1b6-hIzGCj3QT-wE,25137
22
22
  voxcity/geoprocessor/polygon.py,sha256=DfzXf6R-qoWXEZv1z1aHCVfr-DCuCFw6lieQT5cNHPA,61188
23
- voxcity/geoprocessor/utils.py,sha256=DVg3EMRytLQLEQeXLvNgjt1Ynoa689EsD-To-14xgSQ,30369
23
+ voxcity/geoprocessor/utils.py,sha256=s17XpgkLBelmNCk2wcUwTK1tEiFpguWR2BF_n7K17jg,31378
24
24
  voxcity/simulator/__init__.py,sha256=APdkcdaovj0v_RPOaA4SBvFUKT2RM7Hxuuz3Sux4gCo,65
25
- voxcity/simulator/solar.py,sha256=h_jVPjJ8wKl8z8Tx0EcVJBzNRKSr8WXBL9bVCgJpyZE,101788
25
+ voxcity/simulator/solar.py,sha256=4WBFgMm25-9rZ5bSGBmIpaxq2mma9X46Fom7UvGEnT8,106361
26
26
  voxcity/simulator/utils.py,sha256=sEYBB2-hLJxTiXQps1_-Fi7t1HN3-1OPOvBCWtgIisA,130
27
- voxcity/simulator/view.py,sha256=W6QtoSnLSQPEPtTy5B6BB5l0UGQ5Vs-Bt1ISNZKdGTI,92020
27
+ voxcity/simulator/view.py,sha256=ClmRL0Yw3-4_jVF2c_w5KRxGWloVbkpcr9qwwL4OVJc,94258
28
28
  voxcity/utils/__init__.py,sha256=Q-NYCqYnAAaF80KuNwpqIjbE7Ec3Gr4y_khMLIMhJrg,68
29
29
  voxcity/utils/lc.py,sha256=722Gz3lPbgAp0mmTZ-g-QKBbAnbxrcgaYwb1sa7q8Sk,16189
30
30
  voxcity/utils/material.py,sha256=H8K8Lq4wBL6dQtgj7esUW2U6wLCOTeOtelkTDJoRgMo,10007
31
- voxcity/utils/visualization.py,sha256=Hk31pVOZ3q8K0QaudAMSqKUquF1Hd1Hug8626D4JJ74,115143
31
+ voxcity/utils/visualization.py,sha256=ZR9N-XKfydeSStO53IM2hGXyZJoeBiAyIMWw9Cb2MPM,116449
32
32
  voxcity/utils/weather.py,sha256=2Jtg-rIVJcsTtiKE-KuDnhIqS1-MSS16_zFRzj6zmu4,36435
33
- voxcity-0.6.2.dist-info/licenses/AUTHORS.rst,sha256=m82vkI5QokEGdcHof2OxK39lf81w1P58kG9ZNNAKS9U,175
34
- voxcity-0.6.2.dist-info/licenses/LICENSE,sha256=s_jE1Df1nTPL4A_5GCGic5Zwex0CVaPKcAmSilxJPPE,1089
35
- voxcity-0.6.2.dist-info/METADATA,sha256=zbCezoMlL37h_huSEIOhhIa9ax4rlgsJVgeZHhUTQAI,26723
36
- voxcity-0.6.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
37
- voxcity-0.6.2.dist-info/top_level.txt,sha256=00b2U-LKfDllt6RL1R33MXie5MvxzUFye0NGD96t_8I,8
38
- voxcity-0.6.2.dist-info/RECORD,,
33
+ voxcity-0.6.4.dist-info/licenses/AUTHORS.rst,sha256=m82vkI5QokEGdcHof2OxK39lf81w1P58kG9ZNNAKS9U,175
34
+ voxcity-0.6.4.dist-info/licenses/LICENSE,sha256=s_jE1Df1nTPL4A_5GCGic5Zwex0CVaPKcAmSilxJPPE,1089
35
+ voxcity-0.6.4.dist-info/METADATA,sha256=DXSMc39qi5ebhxnONiV2LWsPX-nCWiau4yMstqwl-jA,26749
36
+ voxcity-0.6.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
37
+ voxcity-0.6.4.dist-info/top_level.txt,sha256=00b2U-LKfDllt6RL1R33MXie5MvxzUFye0NGD96t_8I,8
38
+ voxcity-0.6.4.dist-info/RECORD,,