zero2geospatial3d-sdk 0.1.0__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.
- zero2geospatial3d_sdk-0.1.0/CHANGELOG.md +50 -0
- zero2geospatial3d_sdk-0.1.0/CITATION.cff +20 -0
- zero2geospatial3d_sdk-0.1.0/LICENSE +21 -0
- zero2geospatial3d_sdk-0.1.0/MANIFEST.in +12 -0
- zero2geospatial3d_sdk-0.1.0/PKG-INFO +219 -0
- zero2geospatial3d_sdk-0.1.0/README.md +175 -0
- zero2geospatial3d_sdk-0.1.0/THIRD_PARTY_NOTICES.md +52 -0
- zero2geospatial3d_sdk-0.1.0/pyproject.toml +152 -0
- zero2geospatial3d_sdk-0.1.0/setup.cfg +4 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/__init__.py +105 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/acoustics.py +284 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/classify.py +379 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/cli.py +367 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/comfort.py +687 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/data/epw_stations.json.gz +0 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/daylight.py +337 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/dispersion.py +249 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/epw.py +162 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/geo.py +138 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/grid.py +119 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/microclimate.py +388 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/morphology.py +283 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/nsga2.py +315 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/osm.py +450 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/osm_tags.py +180 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/py.typed +0 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/results.py +231 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/road_sources.py +141 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/scene.py +555 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/server.py +332 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/shading.py +443 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/solar.py +207 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/terrain.py +610 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/urban_form.py +326 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/walkability.py +380 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/weather.py +373 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/index.html +50 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/analysis/climate.js +278 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/analysis/compliance.js +345 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/analysis/gpu.js +431 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/analysis/optimize.js +208 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/analysis/runners.js +1644 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/analysis/terrain_results.js +145 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/app.js +630 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/core/acoustics.js +341 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/core/classify.js +158 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/core/comfort.js +686 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/core/daylight_rule.js +199 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/core/dispersion.js +264 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/core/microclimate.js +372 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/core/morphology.js +153 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/core/nsga2.js +181 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/core/party_walls.js +60 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/core/road_sources.js +127 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/core/solar.js +112 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/core/terrain_analysis.js +267 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/core/terrain_math.js +279 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/core/urban_form.js +405 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/core/walkability.js +316 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/core/weather.js +225 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/core/wind.js +131 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/export/check_pdf.js +74 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/export/exporters.js +556 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/export/pdf.js +149 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/export/snapshot.js +234 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/export/snapshot_scene.js +150 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/main.js +75 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/scene/objects.js +645 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/scene/overlay.js +145 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/scene/terrain.js +546 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/scene/viewer.js +275 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/scene/wind_streamlines.js +336 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/style.css +225 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/ui/building_report.js +404 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/ui/charts.js +441 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/ui/colorize.js +101 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/ui/compare.js +362 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/ui/dom.js +104 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/ui/panel_analyze.js +742 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/ui/panel_compare.js +294 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/ui/panel_layers.js +172 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/ui/panel_terrain.js +277 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/ui/qgis_link.js +127 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/ui/sunclock.js +45 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/ui/tools.js +197 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/src/ui/viewtools.js +173 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/vendor/three/addons/controls/OrbitControls.js +1417 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/vendor/three/addons/exporters/GLTFExporter.js +3309 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/vendor/three/addons/utils/TextureUtils.js +98 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/web/vendor/three/three.module.js +53044 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d/wind.py +178 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d_sdk.egg-info/PKG-INFO +219 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d_sdk.egg-info/SOURCES.txt +111 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d_sdk.egg-info/dependency_links.txt +1 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d_sdk.egg-info/entry_points.txt +2 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d_sdk.egg-info/requires.txt +13 -0
- zero2geospatial3d_sdk-0.1.0/src/zero2geospatial3d_sdk.egg-info/top_level.txt +1 -0
- zero2geospatial3d_sdk-0.1.0/tests/test_acoustics_dispersion.py +223 -0
- zero2geospatial3d_sdk-0.1.0/tests/test_classify.py +70 -0
- zero2geospatial3d_sdk-0.1.0/tests/test_comfort.py +164 -0
- zero2geospatial3d_sdk-0.1.0/tests/test_core_pure.py +136 -0
- zero2geospatial3d_sdk-0.1.0/tests/test_daylight.py +137 -0
- zero2geospatial3d_sdk-0.1.0/tests/test_microclimate.py +218 -0
- zero2geospatial3d_sdk-0.1.0/tests/test_morphology_wind.py +130 -0
- zero2geospatial3d_sdk-0.1.0/tests/test_nsga2.py +103 -0
- zero2geospatial3d_sdk-0.1.0/tests/test_osm_scene.py +219 -0
- zero2geospatial3d_sdk-0.1.0/tests/test_results_server_cli.py +171 -0
- zero2geospatial3d_sdk-0.1.0/tests/test_shading.py +117 -0
- zero2geospatial3d_sdk-0.1.0/tests/test_solar.py +91 -0
- zero2geospatial3d_sdk-0.1.0/tests/test_terrain.py +311 -0
- zero2geospatial3d_sdk-0.1.0/tests/test_urban_form.py +196 -0
- zero2geospatial3d_sdk-0.1.0/tests/test_walkability.py +136 -0
- zero2geospatial3d_sdk-0.1.0/tests/test_weather.py +163 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.0] - 2026-11-08
|
|
11
|
+
### Added
|
|
12
|
+
- First release: a headless, numpy-only Python port of the 02 Geo3D Analyzer QGIS plugin
|
|
13
|
+
(`zero2geospatial3d`).
|
|
14
|
+
- `grid.Grid`: north-up raster in local metres with bilinear sampling, shared by every module.
|
|
15
|
+
- `scene`: `Scene`, `Building`, `Tree` and `Road`; footprint rasterisation into a height surface
|
|
16
|
+
and building-id grid; read and write the plugin's scene package (`scene.json`, `terrain.bin`,
|
|
17
|
+
`L*.geojson`) so scenes move freely between the plugin, the SDK and the viewer.
|
|
18
|
+
- `solar`: NOAA sun position, sunrise and sunset, sun paths and Fibonacci sky sampling.
|
|
19
|
+
- `shading`: shadow masks, sun hours, shadow studies, horizon angles, sky view factor,
|
|
20
|
+
viewshed, direct + diffuse + reflected solar irradiation and rooftop PV yield on a 2.5-D
|
|
21
|
+
height field (the plugin computes these on the GPU).
|
|
22
|
+
- `comfort`: UTCI (Bröde et al. 2012 polynomial), PET, mean radiant temperature, sky
|
|
23
|
+
temperature and the comfort categories.
|
|
24
|
+
- `weather` and `epw`: EPW parsing, monthly summaries, wind roses, an ASHRAE clear-sky year,
|
|
25
|
+
annual sun-direction bins, and nearest-station lookup in a bundled index of about 17,000
|
|
26
|
+
TMYx stations, with downloads from climate.onebuilding.org.
|
|
27
|
+
- `microclimate`: surface temperature (energy balance with Bowen ratio), canopy
|
|
28
|
+
transmittance, downwind evapotranspiration cooling and 24-hour diurnal profiles.
|
|
29
|
+
- `wind` and `morphology`: pedestrian wind ratio with wakes, Lawson classes, distance to
|
|
30
|
+
buildings, Macdonald roughness, block indicators and Local Climate Zones.
|
|
31
|
+
- `dispersion` and `acoustics`: street-canyon ventilation efficiency and air age, traffic
|
|
32
|
+
NO2/PM2.5 dispersion with tree filtration, Maekawa barrier diffraction, noise propagation and
|
|
33
|
+
quiet-facade detection, plus road and street-centreline sources (`road_sources`).
|
|
34
|
+
- `daylight`: BRE 209 25-degree and Vertical Sky Component rules with party-wall handling.
|
|
35
|
+
- `urban_form`: panoramic Green View Index and solar envelopes.
|
|
36
|
+
- `walkability`: pedestrian walkability index and cool-route search.
|
|
37
|
+
- `terrain`: slope and aspect, hillshade, contours, profiles (sections), bathtub and seeded
|
|
38
|
+
flooding, cut/fill with balanced level, curvature, TPI, TRI, aspect classes, flow
|
|
39
|
+
accumulation and topographic wetness.
|
|
40
|
+
- `classify` (equal, quantile and Jenks breaks, colour ramps) and `nsga2` (seeded,
|
|
41
|
+
deterministic NSGA-II).
|
|
42
|
+
- `osm` and `osm_tags`: Overpass download with mirror fail-over, timeouts and a one-week cache,
|
|
43
|
+
and Simple 3D Buildings height rules.
|
|
44
|
+
- `results`: per-building aggregation, ESRI ASCII / `.npy` / GeoTIFF output and viewer
|
|
45
|
+
payload decoding.
|
|
46
|
+
- `server`: the plugin's browser viewer (three.js r160) bundled as package data, served on
|
|
47
|
+
127.0.0.1 with results posted back to disk.
|
|
48
|
+
- Command line `zero2geospatial3d` with `sun`, `stations`, `epw`, `comfort`, `osm`, `demo`,
|
|
49
|
+
`analyze` and `view`.
|
|
50
|
+
- Test suite reproducing the numeric assertions of the plugin's JavaScript tests.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use this software, please cite it as below."
|
|
3
|
+
authors:
|
|
4
|
+
- family-names: "Eminoğlu"
|
|
5
|
+
given-names: "Yusuf"
|
|
6
|
+
email: "yusufeminoglu@gmail.com"
|
|
7
|
+
orcid: "https://orcid.org/0009-0005-6000-2934"
|
|
8
|
+
title: "zero2geospatial3d-sdk"
|
|
9
|
+
version: "0.1.0"
|
|
10
|
+
date-released: "2026-11-08"
|
|
11
|
+
license: "MIT"
|
|
12
|
+
repository-code: "https://github.com/YusufEminoglu/zero2geospatial3d_sdk"
|
|
13
|
+
url: "https://pypi.org/project/zero2geospatial3d-sdk/"
|
|
14
|
+
abstract: "Headless 3D terrain and building analysis in Python: sun hours, shadows, sky view factor, solar PV, UTCI/PET thermal comfort, wind, noise and air-quality screening, daylight rules, terrain sections, flooding and cut/fill. A numpy port of the 02 Geo3D Analyzer (zero2geospatial3d) QGIS plugin."
|
|
15
|
+
keywords:
|
|
16
|
+
- gis
|
|
17
|
+
- urban climate
|
|
18
|
+
- solar
|
|
19
|
+
- thermal comfort
|
|
20
|
+
- terrain analysis
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Yusuf Eminoglu
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
include LICENSE
|
|
2
|
+
include THIRD_PARTY_NOTICES.md
|
|
3
|
+
include README.md
|
|
4
|
+
include CHANGELOG.md
|
|
5
|
+
include CITATION.cff
|
|
6
|
+
include pyproject.toml
|
|
7
|
+
include src/zero2geospatial3d/py.typed
|
|
8
|
+
recursive-include src/zero2geospatial3d *.py
|
|
9
|
+
include src/zero2geospatial3d/data/epw_stations.json.gz
|
|
10
|
+
recursive-include src/zero2geospatial3d/web *.html *.js *.css
|
|
11
|
+
recursive-include tests *.py
|
|
12
|
+
global-exclude __pycache__ *.py[cod]
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: zero2geospatial3d-sdk
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Headless 3D urban and terrain analysis in Python: sun hours, shadows, sky view factor, solar PV, UTCI/PET comfort, noise, dispersion, flooding and cut/fill.
|
|
5
|
+
Author-email: Yusuf Eminoğlu <yusufeminoglu@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://geophilo.com/
|
|
8
|
+
Project-URL: Repository, https://github.com/YusufEminoglu/zero2geospatial3d_sdk
|
|
9
|
+
Project-URL: Issues, https://github.com/YusufEminoglu/zero2geospatial3d_sdk/issues
|
|
10
|
+
Project-URL: Documentation, https://github.com/YusufEminoglu/zero2geospatial3d_sdk#readme
|
|
11
|
+
Project-URL: Changelog, https://github.com/YusufEminoglu/zero2geospatial3d_sdk/blob/main/CHANGELOG.md
|
|
12
|
+
Project-URL: QGIS plugin, https://github.com/YusufEminoglu/zero2geospatial3d
|
|
13
|
+
Keywords: gis,3d,urban-planning,urban-climate,solar,sun-hours,shadow,sky-view-factor,photovoltaic,daylight,bre-209,utci,pet,thermal-comfort,microclimate,wind-comfort,noise,air-quality,viewshed,terrain,dem,flood,cut-and-fill,epw,openstreetmap,walkability
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Operating System :: OS Independent
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
25
|
+
Classifier: Intended Audience :: Science/Research
|
|
26
|
+
Classifier: Intended Audience :: Developers
|
|
27
|
+
Classifier: Typing :: Typed
|
|
28
|
+
Requires-Python: >=3.9
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
License-File: LICENSE
|
|
31
|
+
License-File: THIRD_PARTY_NOTICES.md
|
|
32
|
+
Requires-Dist: numpy>=1.20.0
|
|
33
|
+
Provides-Extra: geo
|
|
34
|
+
Requires-Dist: shapely>=2.0.0; extra == "geo"
|
|
35
|
+
Requires-Dist: rasterio>=1.3.0; extra == "geo"
|
|
36
|
+
Requires-Dist: pyproj>=3.3.0; extra == "geo"
|
|
37
|
+
Requires-Dist: matplotlib>=3.5.0; extra == "geo"
|
|
38
|
+
Provides-Extra: dev
|
|
39
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
40
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
41
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
42
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
43
|
+
Dynamic: license-file
|
|
44
|
+
|
|
45
|
+
<div align="center">
|
|
46
|
+
|
|
47
|
+
# zero2geospatial3d-sdk
|
|
48
|
+
|
|
49
|
+
[](https://pypi.org/project/zero2geospatial3d-sdk/)
|
|
50
|
+
[](https://pypi.org/project/zero2geospatial3d-sdk/)
|
|
51
|
+
[](https://github.com/YusufEminoglu/zero2geospatial3d_sdk/blob/main/LICENSE)
|
|
52
|
+
[](https://docs.astral.sh/ruff/)
|
|
53
|
+
[](#development-and-testing)
|
|
54
|
+
|
|
55
|
+
**Headless 3D terrain and building analysis in Python: sun hours, shadows, sky view factor, solar PV, UTCI/PET comfort, wind, noise and air-quality screening, daylight rules, terrain sections, flooding and cut/fill.**
|
|
56
|
+
|
|
57
|
+
[PyPI Package](https://pypi.org/project/zero2geospatial3d-sdk/) • [GitHub](https://github.com/YusufEminoglu/zero2geospatial3d_sdk) • [Issue Tracker](https://github.com/YusufEminoglu/zero2geospatial3d_sdk/issues) • [QGIS plugin](https://github.com/YusufEminoglu/zero2geospatial3d)
|
|
58
|
+
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
`zero2geospatial3d-sdk` is the scriptable, QGIS-free engine behind the
|
|
62
|
+
**02 Geo3D Analyzer** QGIS plugin (`zero2geospatial3d`). The plugin runs its
|
|
63
|
+
analyses on the GPU in a browser; this package ports the same mathematics to
|
|
64
|
+
NumPy so they run in notebooks, batch jobs, servers and CI pipelines. Scene
|
|
65
|
+
packages are interchangeable: a scene exported by the plugin loads in Python,
|
|
66
|
+
and a scene built in Python opens in the bundled browser viewer.
|
|
67
|
+
|
|
68
|
+
## Installation
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Core: NumPy only
|
|
72
|
+
pip install zero2geospatial3d-sdk
|
|
73
|
+
|
|
74
|
+
# Optional geospatial extras (GeoTIFF output with rasterio, pyproj, shapely, matplotlib)
|
|
75
|
+
pip install "zero2geospatial3d-sdk[geo]"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Python 3.9 to 3.13. The import name is `zero2geospatial3d`.
|
|
79
|
+
|
|
80
|
+
## Quickstart (runs offline)
|
|
81
|
+
|
|
82
|
+
```python
|
|
83
|
+
import numpy as np
|
|
84
|
+
from zero2geospatial3d import Building, Scene, shading, comfort, terrain
|
|
85
|
+
from zero2geospatial3d.results import aggregate_by_id
|
|
86
|
+
|
|
87
|
+
# A 200 m x 200 m level site in Izmir (UTC+3) with a 2 m grid and two buildings.
|
|
88
|
+
scene = Scene.flat(200, 200, cell=2.0, lat=38.42, lon=27.14, utc_offset=3.0)
|
|
89
|
+
for cx, h in ((-30, 24.0), (30, 12.0)):
|
|
90
|
+
ring = [[cx - 15, -10], [cx + 15, -10], [cx + 15, 10], [cx - 15, 10], [cx - 15, -10]]
|
|
91
|
+
scene.buildings.append(Building([[ring]], height=h))
|
|
92
|
+
|
|
93
|
+
surface = scene.surface() # terrain + buildings as a Grid
|
|
94
|
+
_, ids = scene.building_rasters() # building id per cell (0 = ground)
|
|
95
|
+
|
|
96
|
+
# BRE 209: sun hours on 21 March
|
|
97
|
+
hours = shading.sun_hours(surface, scene.lat, scene.lon, scene.utc_offset, month=3, day=21)
|
|
98
|
+
open_ground = hours[ids == 0]
|
|
99
|
+
print(f"open ground with >= 2 h of sun: {100 * np.mean(open_ground >= 2):.0f} %")
|
|
100
|
+
|
|
101
|
+
# Sky view factor and per-building roof statistics
|
|
102
|
+
svf = shading.sky_view_factor(surface, n_azimuths=16)
|
|
103
|
+
print(aggregate_by_id(ids, svf, cell_area=4.0)[1]["mean"])
|
|
104
|
+
|
|
105
|
+
# Thermal comfort for one set of conditions
|
|
106
|
+
print(comfort.utci(32.0, 55.0, 1.5, 40.0), comfort.pet(32.0, 55.0, 1.5, 40.0))
|
|
107
|
+
|
|
108
|
+
# Terrain: slope, flooding and earthworks on the DEM
|
|
109
|
+
slope, aspect = terrain.slope_aspect(scene.terrain)
|
|
110
|
+
pad = [[-20, -20], [20, -20], [20, 20], [-20, 20], [-20, -20]]
|
|
111
|
+
print(terrain.cut_fill(scene.terrain, pad, design_level=0.5).fill)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Command line
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
zero2geospatial3d sun --lat 38.42 --lon 27.14 --date 2026-06-21 --tz 3
|
|
118
|
+
zero2geospatial3d comfort --ta 32 --tr 55 --v 1.5 --rh 40
|
|
119
|
+
zero2geospatial3d stations --lat 41.01 --lon 28.97 -n 3 # nearest TMYx stations
|
|
120
|
+
zero2geospatial3d epw --lat 41.01 --lon 28.97 --out istanbul.epw # download the nearest one
|
|
121
|
+
|
|
122
|
+
zero2geospatial3d demo --out demo_scene # synthetic scene package
|
|
123
|
+
zero2geospatial3d osm --lat 38.4237 --lon 27.1428 --half-size 250 --out izmir_scene
|
|
124
|
+
zero2geospatial3d analyze demo_scene sun-hours --date 2026-03-21 --out sun.asc
|
|
125
|
+
zero2geospatial3d analyze demo_scene svf --azimuths 36 --out svf.npy
|
|
126
|
+
zero2geospatial3d analyze demo_scene irradiation --epw istanbul.epw --out kwh.tif # .tif needs [geo]
|
|
127
|
+
zero2geospatial3d analyze demo_scene flood --level 12 --out depth.asc
|
|
128
|
+
zero2geospatial3d view demo_scene --results results/ # bundled 3D viewer
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
`analyze` supports `sun-hours`, `shadow`, `svf`, `viewshed`, `irradiation`,
|
|
132
|
+
`slope`, `aspect`, `hillshade` and `flood`, and prints summary statistics as
|
|
133
|
+
JSON. `view` serves the plugin's three.js viewer on `127.0.0.1` (your data
|
|
134
|
+
stays on your computer); results sent from the viewer are saved to `--results`.
|
|
135
|
+
|
|
136
|
+
## How the 3D analyses work headlessly
|
|
137
|
+
|
|
138
|
+
The plugin renders depth maps of the full 3D scene on the GPU. The SDK works on
|
|
139
|
+
a 2.5-D **surface**: the DEM plus the heights of buildings (and optionally tree
|
|
140
|
+
crowns) rasterised onto the same grid. Sun visibility is tested by marching
|
|
141
|
+
rays across this surface with bilinear sampling, the sky view factor is
|
|
142
|
+
`1 - mean(sin^2(horizon))` over azimuth sectors, and irradiation combines
|
|
143
|
+
direct sun (from EPW or clear-sky sun-direction bins), isotropic diffuse sky
|
|
144
|
+
and ground reflection, exactly as the plugin's `solarRadiation` runner does.
|
|
145
|
+
Overhangs and facade receivers are not represented in 2.5-D.
|
|
146
|
+
|
|
147
|
+
## Public API
|
|
148
|
+
|
|
149
|
+
| Module | Main contents |
|
|
150
|
+
|---|---|
|
|
151
|
+
| `grid` | `Grid` (values, cell, min_x, max_y; `sample`, `coords`, `index_of`), `make_grid` |
|
|
152
|
+
| `scene` | `Scene` (`flat`, `from_osm`, `surface`, `building_rasters`, `tree_raster`, `export`), `Building`, `Tree`, `Road`, `load_scene`, `rasterize_polygons` |
|
|
153
|
+
| `solar` | `solar_position`, `sunrise_sunset`, `sun_path`, `sky_hemisphere`, `sun_vector`, `day_of_year` |
|
|
154
|
+
| `shading` | `shadow_mask`, `sun_hours`, `shadow_study`, `horizon_angles`, `sky_view_factor`, `viewshed`, `directional_irradiation`, `solar_irradiation`, `pv_yield` |
|
|
155
|
+
| `comfort` | `utci`, `pet`, `mean_radiant_temperature`, `sky_temperature`, `projected_area_factor`, `utci_category`, `pet_category` |
|
|
156
|
+
| `weather` | `Weather`, `parse_epw`, `read_epw`, `monthly_summary`, `wind_rose`, `clear_sky_year`, `annual_sun_bins`, `conditions_at`, `typical_doy` |
|
|
157
|
+
| `epw` | `nearest_stations`, `load_index`, `download_station`, `extract_epw`, `read_header` |
|
|
158
|
+
| `microclimate` | `surface_temperature`, `canopy_transmittance`, `canopy_cooling_grid`, `diurnal_point_profile`, `SURFACE_MATERIALS` |
|
|
159
|
+
| `wind` | `wind_ratio`, `lawson_class`, `OPEN_PEDESTRIAN_FACTOR` |
|
|
160
|
+
| `morphology` | `distance_to_built`, `macdonald`, `classify_lcz`, `block_indicators` |
|
|
161
|
+
| `dispersion` | `ventilation_efficiency`, `pollutant_dispersion`, `ventilation_class`, `air_quality_class` |
|
|
162
|
+
| `acoustics` | `noise_propagation`, `building_facade_noise`, `maekawa_diffraction`, `noise_class` |
|
|
163
|
+
| `road_sources` | `sample_road_lines`, `street_centrelines`, `road_weight` |
|
|
164
|
+
| `daylight` | `prepare_rule`, `check_rule`, `vsc_long`, `allowed_angle`, `reach25`, `wall_samples` (BRE 209) |
|
|
165
|
+
| `urban_form` | `green_view_index`, `solar_envelope`, `gvi_class` |
|
|
166
|
+
| `walkability` | `pedestrian_walkability_index`, `find_cool_route`, subscores |
|
|
167
|
+
| `terrain` | `slope_aspect`, `hillshade`, `contours`, `profile`, `flood`, `cut_fill`, `balanced_level`, `curvature`, `tpi`, `ruggedness`, `aspect_classes`, `flow_accumulation`, `wetness`, `crop_grid` |
|
|
168
|
+
| `classify` | `equal_breaks`, `quantile_breaks`, `jenks_breaks`, `ramp_stops`, `ramp_color`, `RAMPS` |
|
|
169
|
+
| `nsga2` | `Problem`, `nsga2`, `dominates`, `non_dominated_sort`, `crowding_distance` |
|
|
170
|
+
| `osm`, `osm_tags` | `fetch` (Overpass, timeouts, cache), `payload_to_features`, `building_height`, `road_traffic` |
|
|
171
|
+
| `geo` | `lonlat_to_local`, `local_to_lonlat`, `bbox_around`, `utm_epsg_for`, `grid_shape` |
|
|
172
|
+
| `results` | `aggregate_by_id`, `grid_stats`, `write_ascii_grid`, `write_grid_npy`, `write_geotiff`, `save_result` |
|
|
173
|
+
| `server` | `serve_scene`, `ViewerServer`, `viewer_root` |
|
|
174
|
+
|
|
175
|
+
All grids are NumPy arrays of shape `(rows, cols)` with row 0 at the north
|
|
176
|
+
edge; coordinates are local metres (x east, y north). Angles from `solar` are
|
|
177
|
+
radians with azimuth clockwise from north.
|
|
178
|
+
|
|
179
|
+
## Validation
|
|
180
|
+
|
|
181
|
+
The test suite reproduces the numeric assertions of the plugin's JavaScript
|
|
182
|
+
tests (`tests/js/*.test.mjs`): the NREL SPA reference sun position, UTCI and
|
|
183
|
+
PET reference values, EPW parsing and wind roses, surface energy balance and
|
|
184
|
+
canopy cooling, Maekawa diffraction and traffic-noise scaling, ventilation and
|
|
185
|
+
dispersion, BRE 209 VSC closed forms, solar envelopes and green view, terrain
|
|
186
|
+
curvature, TPI, TRI, flow accumulation and wetness, flood and cut/fill
|
|
187
|
+
volumes, Jenks breaks, and the seeded NSGA-II run. The shading engines are
|
|
188
|
+
checked against closed forms (canyon sky view factor, wall shadow length).
|
|
189
|
+
|
|
190
|
+
## Development and testing
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
git clone https://github.com/YusufEminoglu/zero2geospatial3d_sdk.git
|
|
194
|
+
cd zero2geospatial3d_sdk
|
|
195
|
+
pip install -e ".[dev]"
|
|
196
|
+
python -m pytest --cov=zero2geospatial3d
|
|
197
|
+
python -m ruff check .
|
|
198
|
+
python -m mypy src
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## Academic citation
|
|
202
|
+
|
|
203
|
+
```bibtex
|
|
204
|
+
@software{eminoglu_zero2geospatial3d_sdk,
|
|
205
|
+
author = {Eminoğlu, Yusuf},
|
|
206
|
+
title = {zero2geospatial3d-sdk: headless 3D terrain and building analysis in Python},
|
|
207
|
+
year = {2026},
|
|
208
|
+
version = {0.1.0},
|
|
209
|
+
url = {https://github.com/YusufEminoglu/zero2geospatial3d_sdk}
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
See also `CITATION.cff`.
|
|
214
|
+
|
|
215
|
+
## License
|
|
216
|
+
|
|
217
|
+
MIT, see [LICENSE](LICENSE). The bundled viewer includes three.js (MIT) and the
|
|
218
|
+
UTCI polynomial follows pythermalcomfort (MIT); the station index credits
|
|
219
|
+
Climate.OneBuilding.Org. Details in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# zero2geospatial3d-sdk
|
|
4
|
+
|
|
5
|
+
[](https://pypi.org/project/zero2geospatial3d-sdk/)
|
|
6
|
+
[](https://pypi.org/project/zero2geospatial3d-sdk/)
|
|
7
|
+
[](https://github.com/YusufEminoglu/zero2geospatial3d_sdk/blob/main/LICENSE)
|
|
8
|
+
[](https://docs.astral.sh/ruff/)
|
|
9
|
+
[](#development-and-testing)
|
|
10
|
+
|
|
11
|
+
**Headless 3D terrain and building analysis in Python: sun hours, shadows, sky view factor, solar PV, UTCI/PET comfort, wind, noise and air-quality screening, daylight rules, terrain sections, flooding and cut/fill.**
|
|
12
|
+
|
|
13
|
+
[PyPI Package](https://pypi.org/project/zero2geospatial3d-sdk/) • [GitHub](https://github.com/YusufEminoglu/zero2geospatial3d_sdk) • [Issue Tracker](https://github.com/YusufEminoglu/zero2geospatial3d_sdk/issues) • [QGIS plugin](https://github.com/YusufEminoglu/zero2geospatial3d)
|
|
14
|
+
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
`zero2geospatial3d-sdk` is the scriptable, QGIS-free engine behind the
|
|
18
|
+
**02 Geo3D Analyzer** QGIS plugin (`zero2geospatial3d`). The plugin runs its
|
|
19
|
+
analyses on the GPU in a browser; this package ports the same mathematics to
|
|
20
|
+
NumPy so they run in notebooks, batch jobs, servers and CI pipelines. Scene
|
|
21
|
+
packages are interchangeable: a scene exported by the plugin loads in Python,
|
|
22
|
+
and a scene built in Python opens in the bundled browser viewer.
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Core: NumPy only
|
|
28
|
+
pip install zero2geospatial3d-sdk
|
|
29
|
+
|
|
30
|
+
# Optional geospatial extras (GeoTIFF output with rasterio, pyproj, shapely, matplotlib)
|
|
31
|
+
pip install "zero2geospatial3d-sdk[geo]"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Python 3.9 to 3.13. The import name is `zero2geospatial3d`.
|
|
35
|
+
|
|
36
|
+
## Quickstart (runs offline)
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
import numpy as np
|
|
40
|
+
from zero2geospatial3d import Building, Scene, shading, comfort, terrain
|
|
41
|
+
from zero2geospatial3d.results import aggregate_by_id
|
|
42
|
+
|
|
43
|
+
# A 200 m x 200 m level site in Izmir (UTC+3) with a 2 m grid and two buildings.
|
|
44
|
+
scene = Scene.flat(200, 200, cell=2.0, lat=38.42, lon=27.14, utc_offset=3.0)
|
|
45
|
+
for cx, h in ((-30, 24.0), (30, 12.0)):
|
|
46
|
+
ring = [[cx - 15, -10], [cx + 15, -10], [cx + 15, 10], [cx - 15, 10], [cx - 15, -10]]
|
|
47
|
+
scene.buildings.append(Building([[ring]], height=h))
|
|
48
|
+
|
|
49
|
+
surface = scene.surface() # terrain + buildings as a Grid
|
|
50
|
+
_, ids = scene.building_rasters() # building id per cell (0 = ground)
|
|
51
|
+
|
|
52
|
+
# BRE 209: sun hours on 21 March
|
|
53
|
+
hours = shading.sun_hours(surface, scene.lat, scene.lon, scene.utc_offset, month=3, day=21)
|
|
54
|
+
open_ground = hours[ids == 0]
|
|
55
|
+
print(f"open ground with >= 2 h of sun: {100 * np.mean(open_ground >= 2):.0f} %")
|
|
56
|
+
|
|
57
|
+
# Sky view factor and per-building roof statistics
|
|
58
|
+
svf = shading.sky_view_factor(surface, n_azimuths=16)
|
|
59
|
+
print(aggregate_by_id(ids, svf, cell_area=4.0)[1]["mean"])
|
|
60
|
+
|
|
61
|
+
# Thermal comfort for one set of conditions
|
|
62
|
+
print(comfort.utci(32.0, 55.0, 1.5, 40.0), comfort.pet(32.0, 55.0, 1.5, 40.0))
|
|
63
|
+
|
|
64
|
+
# Terrain: slope, flooding and earthworks on the DEM
|
|
65
|
+
slope, aspect = terrain.slope_aspect(scene.terrain)
|
|
66
|
+
pad = [[-20, -20], [20, -20], [20, 20], [-20, 20], [-20, -20]]
|
|
67
|
+
print(terrain.cut_fill(scene.terrain, pad, design_level=0.5).fill)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Command line
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
zero2geospatial3d sun --lat 38.42 --lon 27.14 --date 2026-06-21 --tz 3
|
|
74
|
+
zero2geospatial3d comfort --ta 32 --tr 55 --v 1.5 --rh 40
|
|
75
|
+
zero2geospatial3d stations --lat 41.01 --lon 28.97 -n 3 # nearest TMYx stations
|
|
76
|
+
zero2geospatial3d epw --lat 41.01 --lon 28.97 --out istanbul.epw # download the nearest one
|
|
77
|
+
|
|
78
|
+
zero2geospatial3d demo --out demo_scene # synthetic scene package
|
|
79
|
+
zero2geospatial3d osm --lat 38.4237 --lon 27.1428 --half-size 250 --out izmir_scene
|
|
80
|
+
zero2geospatial3d analyze demo_scene sun-hours --date 2026-03-21 --out sun.asc
|
|
81
|
+
zero2geospatial3d analyze demo_scene svf --azimuths 36 --out svf.npy
|
|
82
|
+
zero2geospatial3d analyze demo_scene irradiation --epw istanbul.epw --out kwh.tif # .tif needs [geo]
|
|
83
|
+
zero2geospatial3d analyze demo_scene flood --level 12 --out depth.asc
|
|
84
|
+
zero2geospatial3d view demo_scene --results results/ # bundled 3D viewer
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`analyze` supports `sun-hours`, `shadow`, `svf`, `viewshed`, `irradiation`,
|
|
88
|
+
`slope`, `aspect`, `hillshade` and `flood`, and prints summary statistics as
|
|
89
|
+
JSON. `view` serves the plugin's three.js viewer on `127.0.0.1` (your data
|
|
90
|
+
stays on your computer); results sent from the viewer are saved to `--results`.
|
|
91
|
+
|
|
92
|
+
## How the 3D analyses work headlessly
|
|
93
|
+
|
|
94
|
+
The plugin renders depth maps of the full 3D scene on the GPU. The SDK works on
|
|
95
|
+
a 2.5-D **surface**: the DEM plus the heights of buildings (and optionally tree
|
|
96
|
+
crowns) rasterised onto the same grid. Sun visibility is tested by marching
|
|
97
|
+
rays across this surface with bilinear sampling, the sky view factor is
|
|
98
|
+
`1 - mean(sin^2(horizon))` over azimuth sectors, and irradiation combines
|
|
99
|
+
direct sun (from EPW or clear-sky sun-direction bins), isotropic diffuse sky
|
|
100
|
+
and ground reflection, exactly as the plugin's `solarRadiation` runner does.
|
|
101
|
+
Overhangs and facade receivers are not represented in 2.5-D.
|
|
102
|
+
|
|
103
|
+
## Public API
|
|
104
|
+
|
|
105
|
+
| Module | Main contents |
|
|
106
|
+
|---|---|
|
|
107
|
+
| `grid` | `Grid` (values, cell, min_x, max_y; `sample`, `coords`, `index_of`), `make_grid` |
|
|
108
|
+
| `scene` | `Scene` (`flat`, `from_osm`, `surface`, `building_rasters`, `tree_raster`, `export`), `Building`, `Tree`, `Road`, `load_scene`, `rasterize_polygons` |
|
|
109
|
+
| `solar` | `solar_position`, `sunrise_sunset`, `sun_path`, `sky_hemisphere`, `sun_vector`, `day_of_year` |
|
|
110
|
+
| `shading` | `shadow_mask`, `sun_hours`, `shadow_study`, `horizon_angles`, `sky_view_factor`, `viewshed`, `directional_irradiation`, `solar_irradiation`, `pv_yield` |
|
|
111
|
+
| `comfort` | `utci`, `pet`, `mean_radiant_temperature`, `sky_temperature`, `projected_area_factor`, `utci_category`, `pet_category` |
|
|
112
|
+
| `weather` | `Weather`, `parse_epw`, `read_epw`, `monthly_summary`, `wind_rose`, `clear_sky_year`, `annual_sun_bins`, `conditions_at`, `typical_doy` |
|
|
113
|
+
| `epw` | `nearest_stations`, `load_index`, `download_station`, `extract_epw`, `read_header` |
|
|
114
|
+
| `microclimate` | `surface_temperature`, `canopy_transmittance`, `canopy_cooling_grid`, `diurnal_point_profile`, `SURFACE_MATERIALS` |
|
|
115
|
+
| `wind` | `wind_ratio`, `lawson_class`, `OPEN_PEDESTRIAN_FACTOR` |
|
|
116
|
+
| `morphology` | `distance_to_built`, `macdonald`, `classify_lcz`, `block_indicators` |
|
|
117
|
+
| `dispersion` | `ventilation_efficiency`, `pollutant_dispersion`, `ventilation_class`, `air_quality_class` |
|
|
118
|
+
| `acoustics` | `noise_propagation`, `building_facade_noise`, `maekawa_diffraction`, `noise_class` |
|
|
119
|
+
| `road_sources` | `sample_road_lines`, `street_centrelines`, `road_weight` |
|
|
120
|
+
| `daylight` | `prepare_rule`, `check_rule`, `vsc_long`, `allowed_angle`, `reach25`, `wall_samples` (BRE 209) |
|
|
121
|
+
| `urban_form` | `green_view_index`, `solar_envelope`, `gvi_class` |
|
|
122
|
+
| `walkability` | `pedestrian_walkability_index`, `find_cool_route`, subscores |
|
|
123
|
+
| `terrain` | `slope_aspect`, `hillshade`, `contours`, `profile`, `flood`, `cut_fill`, `balanced_level`, `curvature`, `tpi`, `ruggedness`, `aspect_classes`, `flow_accumulation`, `wetness`, `crop_grid` |
|
|
124
|
+
| `classify` | `equal_breaks`, `quantile_breaks`, `jenks_breaks`, `ramp_stops`, `ramp_color`, `RAMPS` |
|
|
125
|
+
| `nsga2` | `Problem`, `nsga2`, `dominates`, `non_dominated_sort`, `crowding_distance` |
|
|
126
|
+
| `osm`, `osm_tags` | `fetch` (Overpass, timeouts, cache), `payload_to_features`, `building_height`, `road_traffic` |
|
|
127
|
+
| `geo` | `lonlat_to_local`, `local_to_lonlat`, `bbox_around`, `utm_epsg_for`, `grid_shape` |
|
|
128
|
+
| `results` | `aggregate_by_id`, `grid_stats`, `write_ascii_grid`, `write_grid_npy`, `write_geotiff`, `save_result` |
|
|
129
|
+
| `server` | `serve_scene`, `ViewerServer`, `viewer_root` |
|
|
130
|
+
|
|
131
|
+
All grids are NumPy arrays of shape `(rows, cols)` with row 0 at the north
|
|
132
|
+
edge; coordinates are local metres (x east, y north). Angles from `solar` are
|
|
133
|
+
radians with azimuth clockwise from north.
|
|
134
|
+
|
|
135
|
+
## Validation
|
|
136
|
+
|
|
137
|
+
The test suite reproduces the numeric assertions of the plugin's JavaScript
|
|
138
|
+
tests (`tests/js/*.test.mjs`): the NREL SPA reference sun position, UTCI and
|
|
139
|
+
PET reference values, EPW parsing and wind roses, surface energy balance and
|
|
140
|
+
canopy cooling, Maekawa diffraction and traffic-noise scaling, ventilation and
|
|
141
|
+
dispersion, BRE 209 VSC closed forms, solar envelopes and green view, terrain
|
|
142
|
+
curvature, TPI, TRI, flow accumulation and wetness, flood and cut/fill
|
|
143
|
+
volumes, Jenks breaks, and the seeded NSGA-II run. The shading engines are
|
|
144
|
+
checked against closed forms (canyon sky view factor, wall shadow length).
|
|
145
|
+
|
|
146
|
+
## Development and testing
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
git clone https://github.com/YusufEminoglu/zero2geospatial3d_sdk.git
|
|
150
|
+
cd zero2geospatial3d_sdk
|
|
151
|
+
pip install -e ".[dev]"
|
|
152
|
+
python -m pytest --cov=zero2geospatial3d
|
|
153
|
+
python -m ruff check .
|
|
154
|
+
python -m mypy src
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Academic citation
|
|
158
|
+
|
|
159
|
+
```bibtex
|
|
160
|
+
@software{eminoglu_zero2geospatial3d_sdk,
|
|
161
|
+
author = {Eminoğlu, Yusuf},
|
|
162
|
+
title = {zero2geospatial3d-sdk: headless 3D terrain and building analysis in Python},
|
|
163
|
+
year = {2026},
|
|
164
|
+
version = {0.1.0},
|
|
165
|
+
url = {https://github.com/YusufEminoglu/zero2geospatial3d_sdk}
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
See also `CITATION.cff`.
|
|
170
|
+
|
|
171
|
+
## License
|
|
172
|
+
|
|
173
|
+
MIT, see [LICENSE](LICENSE). The bundled viewer includes three.js (MIT) and the
|
|
174
|
+
UTCI polynomial follows pythermalcomfort (MIT); the station index credits
|
|
175
|
+
Climate.OneBuilding.Org. Details in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
zero2geospatial3d-sdk (a Python port of the 02 Geo3D Analyzer QGIS plugin) ships or
|
|
4
|
+
derives from the following works. Paths are relative to `src/zero2geospatial3d/`.
|
|
5
|
+
|
|
6
|
+
## Three.js r160
|
|
7
|
+
|
|
8
|
+
Source: <https://github.com/mrdoob/three.js>
|
|
9
|
+
|
|
10
|
+
The MIT License
|
|
11
|
+
|
|
12
|
+
Copyright © 2010-2023 Three.js Authors
|
|
13
|
+
|
|
14
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
in the Software without restriction, including without limitation the rights
|
|
17
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
19
|
+
furnished to do so, subject to the following conditions:
|
|
20
|
+
|
|
21
|
+
The above copyright notice and this permission notice shall be included in all
|
|
22
|
+
copies or substantial portions of the Software.
|
|
23
|
+
|
|
24
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
25
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
26
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
28
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
|
+
SOFTWARE.
|
|
31
|
+
|
|
32
|
+
Files: `web/vendor/three/three.module.js` and the add-ons under `web/vendor/three/addons/`
|
|
33
|
+
(bundled browser viewer).
|
|
34
|
+
|
|
35
|
+
## pythermalcomfort (UTCI polynomial)
|
|
36
|
+
|
|
37
|
+
Source: <https://github.com/CenterForTheBuiltEnvironment/pythermalcomfort>, `models/utci.py`.
|
|
38
|
+
The UTCI regression polynomial and the saturation vapour pressure function in
|
|
39
|
+
`web/src/core/comfort.js` and its Python port `comfort.py` are transcribed from it. The polynomial itself is the
|
|
40
|
+
operational approximation of Bröde et al. (2012), Int J Biometeorol 56:481-494,
|
|
41
|
+
doi:10.1007/s00484-011-0454-1.
|
|
42
|
+
|
|
43
|
+
MIT License, Copyright (c) 2019 Federico Tartarini. The full MIT text is the
|
|
44
|
+
same as the one above, with that copyright line.
|
|
45
|
+
|
|
46
|
+
## climate.onebuilding.org station index
|
|
47
|
+
|
|
48
|
+
`data/epw_stations.json.gz` lists station names, coordinates, time zones,
|
|
49
|
+
elevations and download paths taken from the TMYx location indexes published
|
|
50
|
+
at <https://climate.onebuilding.org/> (built with the plugin's `tools/build_epw_index.py`).
|
|
51
|
+
Weather files are downloaded from that site at the user's request; they are
|
|
52
|
+
not bundled. Credit: Climate.OneBuilding.Org.
|