ObjectNat 1.2.1__tar.gz → 1.3.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.

Potentially problematic release.


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

Files changed (37) hide show
  1. objectnat-1.3.0/PKG-INFO +201 -0
  2. objectnat-1.3.0/README.rst +179 -0
  3. {objectnat-1.2.1 → objectnat-1.3.0}/pyproject.toml +23 -15
  4. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/_config.py +0 -4
  5. objectnat-1.3.0/src/objectnat/_version.py +1 -0
  6. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/coverage_zones/graph_coverage.py +11 -4
  7. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/coverage_zones/radius_voronoi_coverage.py +4 -2
  8. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/coverage_zones/stepped_coverage.py +20 -10
  9. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/isochrones/isochrones.py +31 -11
  10. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/noise/noise_simulation.py +14 -13
  11. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/noise/noise_simulation_simplified.py +10 -9
  12. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/point_clustering/cluster_points_in_polygons.py +3 -3
  13. objectnat-1.3.0/src/objectnat/methods/provision/provision.py +213 -0
  14. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/provision/provision_model.py +3 -17
  15. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/utils/graph_utils.py +5 -5
  16. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/utils/math_utils.py +1 -1
  17. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/visibility/visibility_analysis.py +9 -17
  18. objectnat-1.2.1/PKG-INFO +0 -115
  19. objectnat-1.2.1/README.md +0 -92
  20. objectnat-1.2.1/src/objectnat/_version.py +0 -1
  21. objectnat-1.2.1/src/objectnat/methods/provision/provision.py +0 -117
  22. {objectnat-1.2.1 → objectnat-1.3.0}/LICENSE.txt +0 -0
  23. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/__init__.py +0 -0
  24. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/_api.py +0 -0
  25. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/__init__.py +0 -0
  26. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/coverage_zones/__init__.py +0 -0
  27. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/isochrones/__init__.py +0 -0
  28. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/isochrones/isochrone_utils.py +0 -0
  29. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/noise/__init__.py +0 -0
  30. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/noise/noise_init_data.py +0 -0
  31. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/noise/noise_reduce.py +0 -0
  32. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/point_clustering/__init__.py +0 -0
  33. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/provision/__init__.py +0 -0
  34. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/provision/provision_exceptions.py +0 -0
  35. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/utils/__init__.py +0 -0
  36. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/utils/geom_utils.py +0 -0
  37. {objectnat-1.2.1 → objectnat-1.3.0}/src/objectnat/methods/visibility/__init__.py +0 -0
@@ -0,0 +1,201 @@
1
+ Metadata-Version: 2.3
2
+ Name: ObjectNat
3
+ Version: 1.3.0
4
+ Summary: ObjectNat is an open-source library created for geospatial analysis created by IDU team
5
+ License: BSD-3-Clause
6
+ Author: DDonnyy
7
+ Author-email: 63115678+DDonnyy@users.noreply.github.com
8
+ Requires-Python: >=3.11,<3.13
9
+ Classifier: License :: OSI Approved :: BSD License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Requires-Dist: geopandas (>=1.0.1,<2.0.0)
14
+ Requires-Dist: loguru (>=0.7.3,<0.8.0)
15
+ Requires-Dist: networkx (>=3.4.2,<4.0.0)
16
+ Requires-Dist: numpy (>=2.1.3,<3.0.0)
17
+ Requires-Dist: pandas (>=2.2.0,<3.0.0)
18
+ Requires-Dist: scikit-learn (>=1.4.0,<2.0.0)
19
+ Requires-Dist: tqdm (>=4.66.2,<5.0.0)
20
+ Description-Content-Type: text/x-rst
21
+
22
+ ObjectNat
23
+ =========
24
+
25
+ Object-oriented Network Analysis Tools
26
+ --------------------------------------
27
+
28
+ .. |badge-black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
29
+ :target: https://github.com/psf/black
30
+ :alt: Code style: black
31
+
32
+ .. |badge-pypi| image:: https://img.shields.io/pypi/v/objectnat.svg
33
+ :target: https://pypi.org/project/objectnat/
34
+ :alt: PyPI version
35
+
36
+ .. |badge-ci| image:: https://github.com/IDUclub/ObjectNat/actions/workflows/ci_pipeline.yml/badge.svg
37
+ :target: https://github.com/IDUclub/ObjectNat/actions/workflows/ci_pipeline.yml
38
+ :alt: CI
39
+
40
+ .. |badge-codecov| image:: https://codecov.io/gh/DDonnyy/ObjectNat/graph/badge.svg?token=K6JFSJ02GU
41
+ :target: https://codecov.io/gh/DDonnyy/ObjectNat
42
+ :alt: Coverage
43
+
44
+ .. |badge-license| image:: https://img.shields.io/badge/license-BSD--3--Clause-blue.svg
45
+ :target: https://opensource.org/licenses/BSD-3-Clause
46
+ :alt: License
47
+
48
+ .. |badge-docs| image:: https://img.shields.io/badge/docs-latest-4aa0d5?logo=readthedocs
49
+ :target: https://iduclub.github.io/ObjectNat/
50
+ :alt: Docs
51
+
52
+ |badge-black| |badge-pypi| |badge-ci| |badge-codecov| |badge-license| |badge-docs|
53
+
54
+ `РИДМИ (Russian) <https://github.com/IDUclub/ObjectNat/blob/main/README_RU.rst>`__
55
+
56
+ .. image:: https://raw.githubusercontent.com/IDUclub/ObjectNat/main/docs/_static/ONlogo.svg
57
+ :align: center
58
+ :width: 400
59
+ :alt: ObjectNat logo
60
+
61
+
62
+ **ObjectNat** is an open-source library developed by the **IDU** team
63
+ for spatial and network analysis in urban studies.
64
+ The library provides tools for analyzing **accessibility**, **visibility**,
65
+ **noise propagation**, and **service provision**.
66
+ ----
67
+
68
+ Key Features
69
+ ------------
70
+
71
+ Each feature includes a **Jupyter Notebook example** and **full documentation**.
72
+
73
+ 1. **Isochrones and Transport Accessibility**
74
+
75
+ Isochrones represent areas reachable from an origin point within a specified time along a transport network.
76
+ This feature allows the analysis of transport accessibility using pedestrian, road,
77
+ public transport, or multimodal graphs.
78
+
79
+ The library supports several methods for building isochrones:
80
+
81
+ - **Basic isochrones**: display a single zone reachable within a specified time.
82
+ - **Step isochrones**: divide the accessibility area into time intervals (e.g., 3, 5, 10 minutes).
83
+
84
+
85
+ 📘 `Example <https://iduclub.github.io/ObjectNat/methods/examples/isochrones.html>`__
86
+ 🔗 `Documentation <https://iduclub.github.io/ObjectNat/methods/isochrones.html>`__
87
+
88
+ 2. **Graph Coverage Zones from Points**
89
+
90
+ A function for generating **coverage areas** from a set of origin points using a transport network.
91
+ It computes the area reachable from each point by **travel time** or **distance**,
92
+ then builds polygons using **Voronoi diagrams** and clips them by a given boundary if specified.
93
+
94
+ 📘 `Example <https://iduclub.github.io/ObjectNat/methods/examples/coverage.html>`__
95
+ 🔗 `Documentation <https://iduclub.github.io/ObjectNat/methods/coverage.html>`__
96
+
97
+ 3. **Service Provision Analysis**
98
+
99
+ A function to evaluate how well residential buildings and their populations are provided
100
+ with services (e.g., schools, clinics) that have limited **capacity**
101
+ and a defined **accessibility threshold** (in minutes or meters).
102
+ The function models the **balance between supply and demand**,
103
+ assessing how well services meet the needs of nearby buildings within an acceptable time.
104
+
105
+ 📘 `Example <https://iduclub.github.io/ObjectNat/methods/examples/provision.html>`__
106
+ 🔗 `Documentation <https://iduclub.github.io/ObjectNat/methods/provision.html>`__
107
+
108
+ 4. **Visibility Analysis**
109
+
110
+ A function for evaluating visibility from a given point or set of points to nearby buildings within a given radius.
111
+ It is used to assess visual accessibility in urban environments.
112
+ A module is also implemented for computing **visibility coverage zones**
113
+ using a dense observer grid (recommended ~1000 points with a 10–20 m spacing).
114
+ Points can be generated along the transport network and distributed across its edges.
115
+
116
+ 📘 `Example <https://iduclub.github.io/ObjectNat/methods/examples/visibility.html>`__
117
+ 🔗 `Documentation <https://iduclub.github.io/ObjectNat/methods/visibility.html>`__
118
+
119
+ 5. **Noise Simulation & Noise Frame**
120
+
121
+ Simulation of noise propagation from sources, taking into account **obstacles**, **vegetation**,
122
+ and **environmental factors**.
123
+
124
+ 📘 `Example <https://iduclub.github.io/ObjectNat/methods/examples/noise.html>`__
125
+ 🔗 `Documentation <https://iduclub.github.io/ObjectNat/methods/noise.html>`__
126
+ 🧠 `Detailed theory <https://github.com/DDonnyy/ObjectNat/wiki/Noise-simulation>`__
127
+
128
+ 6. **Point Clusterization**
129
+
130
+ A function for constructing **cluster polygons** based on a set of points using:
131
+
132
+ - Minimum **distance** between points.
133
+ - Minimum **number of points** in a cluster.
134
+
135
+ The function can also compute the **ratio of service types** in each cluster
136
+ for spatial analysis of service composition.
137
+
138
+ 📘 `Example <https://iduclub.github.io/ObjectNat/methods/examples/clustering.html>`__
139
+ 🔗 `Documentation <https://iduclub.github.io/ObjectNat/methods/clustering.html>`__
140
+
141
+ ----
142
+
143
+ City Graphs via *IduEdu*
144
+ ------------------------
145
+
146
+ For optimal performance, **ObjectNat** is recommended to be used with graphs
147
+ created by the `IduEdu <https://github.com/IDUclub/IduEdu>`_ library.
148
+
149
+ **IduEdu** is an open-source Python library designed for building and processing
150
+ complex urban networks based on OpenStreetMap data.
151
+
152
+
153
+ **IduEdu** can be installed via ``pip``::
154
+
155
+ pip install IduEdu
156
+
157
+ Example usage::
158
+
159
+ from iduedu import get_4326_boundary, get_intermodal_graph
160
+
161
+ poly = get_4326_boundary(osm_id=1114252)
162
+ G_intermodal = get_intermodal_graph(territory=poly, clip_by_territory=True)
163
+
164
+ ----
165
+
166
+ Installation
167
+ ------------
168
+
169
+ **ObjectNat** can be installed via ``pip``::
170
+
171
+ pip install ObjectNat
172
+
173
+ ----
174
+
175
+ Configuration
176
+ -------------
177
+
178
+ You can adjust logging and progress bar output using the config module::
179
+
180
+ from objectnat import config
181
+
182
+ config.change_logger_lvl("INFO") # mute debug logs
183
+ config.set_enable_tqdm(False) # disable tqdm progress bars
184
+
185
+ ----
186
+
187
+ Contacts
188
+ --------
189
+
190
+ - `NCCR <https://actcognitive.org/>`_ — National Center for Cognitive Research
191
+ - `IDU <https://idu.itmo.ru/>`_ — Institute of Design and Urban Studies
192
+ - `Natalya Chichkova <https://t.me/nancy_nat>`_ — Project Manager
193
+ - `Danila Oleynikov (Donny) <https://t.me/ddonny_dd>`_ — Lead Software Engineer
194
+
195
+ ----
196
+
197
+ Publications
198
+ ------------
199
+
200
+ Coming soon.
201
+
@@ -0,0 +1,179 @@
1
+ ObjectNat
2
+ =========
3
+
4
+ Object-oriented Network Analysis Tools
5
+ --------------------------------------
6
+
7
+ .. |badge-black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
8
+ :target: https://github.com/psf/black
9
+ :alt: Code style: black
10
+
11
+ .. |badge-pypi| image:: https://img.shields.io/pypi/v/objectnat.svg
12
+ :target: https://pypi.org/project/objectnat/
13
+ :alt: PyPI version
14
+
15
+ .. |badge-ci| image:: https://github.com/IDUclub/ObjectNat/actions/workflows/ci_pipeline.yml/badge.svg
16
+ :target: https://github.com/IDUclub/ObjectNat/actions/workflows/ci_pipeline.yml
17
+ :alt: CI
18
+
19
+ .. |badge-codecov| image:: https://codecov.io/gh/DDonnyy/ObjectNat/graph/badge.svg?token=K6JFSJ02GU
20
+ :target: https://codecov.io/gh/DDonnyy/ObjectNat
21
+ :alt: Coverage
22
+
23
+ .. |badge-license| image:: https://img.shields.io/badge/license-BSD--3--Clause-blue.svg
24
+ :target: https://opensource.org/licenses/BSD-3-Clause
25
+ :alt: License
26
+
27
+ .. |badge-docs| image:: https://img.shields.io/badge/docs-latest-4aa0d5?logo=readthedocs
28
+ :target: https://iduclub.github.io/ObjectNat/
29
+ :alt: Docs
30
+
31
+ |badge-black| |badge-pypi| |badge-ci| |badge-codecov| |badge-license| |badge-docs|
32
+
33
+ `РИДМИ (Russian) <https://github.com/IDUclub/ObjectNat/blob/main/README_RU.rst>`__
34
+
35
+ .. image:: https://raw.githubusercontent.com/IDUclub/ObjectNat/main/docs/_static/ONlogo.svg
36
+ :align: center
37
+ :width: 400
38
+ :alt: ObjectNat logo
39
+
40
+
41
+ **ObjectNat** is an open-source library developed by the **IDU** team
42
+ for spatial and network analysis in urban studies.
43
+ The library provides tools for analyzing **accessibility**, **visibility**,
44
+ **noise propagation**, and **service provision**.
45
+ ----
46
+
47
+ Key Features
48
+ ------------
49
+
50
+ Each feature includes a **Jupyter Notebook example** and **full documentation**.
51
+
52
+ 1. **Isochrones and Transport Accessibility**
53
+
54
+ Isochrones represent areas reachable from an origin point within a specified time along a transport network.
55
+ This feature allows the analysis of transport accessibility using pedestrian, road,
56
+ public transport, or multimodal graphs.
57
+
58
+ The library supports several methods for building isochrones:
59
+
60
+ - **Basic isochrones**: display a single zone reachable within a specified time.
61
+ - **Step isochrones**: divide the accessibility area into time intervals (e.g., 3, 5, 10 minutes).
62
+
63
+
64
+ 📘 `Example <https://iduclub.github.io/ObjectNat/methods/examples/isochrones.html>`__
65
+ 🔗 `Documentation <https://iduclub.github.io/ObjectNat/methods/isochrones.html>`__
66
+
67
+ 2. **Graph Coverage Zones from Points**
68
+
69
+ A function for generating **coverage areas** from a set of origin points using a transport network.
70
+ It computes the area reachable from each point by **travel time** or **distance**,
71
+ then builds polygons using **Voronoi diagrams** and clips them by a given boundary if specified.
72
+
73
+ 📘 `Example <https://iduclub.github.io/ObjectNat/methods/examples/coverage.html>`__
74
+ 🔗 `Documentation <https://iduclub.github.io/ObjectNat/methods/coverage.html>`__
75
+
76
+ 3. **Service Provision Analysis**
77
+
78
+ A function to evaluate how well residential buildings and their populations are provided
79
+ with services (e.g., schools, clinics) that have limited **capacity**
80
+ and a defined **accessibility threshold** (in minutes or meters).
81
+ The function models the **balance between supply and demand**,
82
+ assessing how well services meet the needs of nearby buildings within an acceptable time.
83
+
84
+ 📘 `Example <https://iduclub.github.io/ObjectNat/methods/examples/provision.html>`__
85
+ 🔗 `Documentation <https://iduclub.github.io/ObjectNat/methods/provision.html>`__
86
+
87
+ 4. **Visibility Analysis**
88
+
89
+ A function for evaluating visibility from a given point or set of points to nearby buildings within a given radius.
90
+ It is used to assess visual accessibility in urban environments.
91
+ A module is also implemented for computing **visibility coverage zones**
92
+ using a dense observer grid (recommended ~1000 points with a 10–20 m spacing).
93
+ Points can be generated along the transport network and distributed across its edges.
94
+
95
+ 📘 `Example <https://iduclub.github.io/ObjectNat/methods/examples/visibility.html>`__
96
+ 🔗 `Documentation <https://iduclub.github.io/ObjectNat/methods/visibility.html>`__
97
+
98
+ 5. **Noise Simulation & Noise Frame**
99
+
100
+ Simulation of noise propagation from sources, taking into account **obstacles**, **vegetation**,
101
+ and **environmental factors**.
102
+
103
+ 📘 `Example <https://iduclub.github.io/ObjectNat/methods/examples/noise.html>`__
104
+ 🔗 `Documentation <https://iduclub.github.io/ObjectNat/methods/noise.html>`__
105
+ 🧠 `Detailed theory <https://github.com/DDonnyy/ObjectNat/wiki/Noise-simulation>`__
106
+
107
+ 6. **Point Clusterization**
108
+
109
+ A function for constructing **cluster polygons** based on a set of points using:
110
+
111
+ - Minimum **distance** between points.
112
+ - Minimum **number of points** in a cluster.
113
+
114
+ The function can also compute the **ratio of service types** in each cluster
115
+ for spatial analysis of service composition.
116
+
117
+ 📘 `Example <https://iduclub.github.io/ObjectNat/methods/examples/clustering.html>`__
118
+ 🔗 `Documentation <https://iduclub.github.io/ObjectNat/methods/clustering.html>`__
119
+
120
+ ----
121
+
122
+ City Graphs via *IduEdu*
123
+ ------------------------
124
+
125
+ For optimal performance, **ObjectNat** is recommended to be used with graphs
126
+ created by the `IduEdu <https://github.com/IDUclub/IduEdu>`_ library.
127
+
128
+ **IduEdu** is an open-source Python library designed for building and processing
129
+ complex urban networks based on OpenStreetMap data.
130
+
131
+
132
+ **IduEdu** can be installed via ``pip``::
133
+
134
+ pip install IduEdu
135
+
136
+ Example usage::
137
+
138
+ from iduedu import get_4326_boundary, get_intermodal_graph
139
+
140
+ poly = get_4326_boundary(osm_id=1114252)
141
+ G_intermodal = get_intermodal_graph(territory=poly, clip_by_territory=True)
142
+
143
+ ----
144
+
145
+ Installation
146
+ ------------
147
+
148
+ **ObjectNat** can be installed via ``pip``::
149
+
150
+ pip install ObjectNat
151
+
152
+ ----
153
+
154
+ Configuration
155
+ -------------
156
+
157
+ You can adjust logging and progress bar output using the config module::
158
+
159
+ from objectnat import config
160
+
161
+ config.change_logger_lvl("INFO") # mute debug logs
162
+ config.set_enable_tqdm(False) # disable tqdm progress bars
163
+
164
+ ----
165
+
166
+ Contacts
167
+ --------
168
+
169
+ - `NCCR <https://actcognitive.org/>`_ — National Center for Cognitive Research
170
+ - `IDU <https://idu.itmo.ru/>`_ — Institute of Design and Urban Studies
171
+ - `Natalya Chichkova <https://t.me/nancy_nat>`_ — Project Manager
172
+ - `Danila Oleynikov (Donny) <https://t.me/ddonny_dd>`_ — Lead Software Engineer
173
+
174
+ ----
175
+
176
+ Publications
177
+ ------------
178
+
179
+ Coming soon.
@@ -1,41 +1,49 @@
1
1
  [tool.poetry]
2
2
  name = "ObjectNat"
3
- version = "1.2.1"
3
+ version = "1.3.0"
4
4
  description = "ObjectNat is an open-source library created for geospatial analysis created by IDU team"
5
5
  license = "BSD-3-Clause"
6
6
  authors = ["DDonnyy <63115678+DDonnyy@users.noreply.github.com>"]
7
- readme = "README.md"
7
+ readme = "README.rst"
8
8
 
9
9
  packages = [{ include = "objectnat", from = "src" }]
10
10
 
11
11
  [tool.poetry.dependencies]
12
- python = ">=3.10,<3.13"
12
+ python = ">=3.11,<3.13"
13
13
  numpy = "^2.1.3"
14
14
  pandas = "^2.2.0"
15
15
  geopandas = "^1.0.1"
16
16
  tqdm = "^4.66.2"
17
- pandarallel = "^1.6.5"
18
17
  networkx = "^3.4.2"
19
18
  scikit-learn = "^1.4.0"
20
19
  loguru = "^0.7.3"
21
20
 
21
+
22
+ [tool.poetry.group.test.dependencies]
23
+ pytest = "^8.3.5"
24
+ pytest-cov = "^6.0.0"
25
+ folium = "^0.19.5"
26
+ matplotlib = "^3.10.1"
27
+ mapclassify = "^2.8.1"
28
+ iduedu = "^1.0.0"
29
+
22
30
  [tool.poetry.group.dev.dependencies]
23
- iduedu = "^0.5.0"
24
31
  pyarrow = "^19.0.1"
25
32
  black = "^24.2.0"
26
33
  pylint = "^3.0.3"
27
34
  isort = "^5.13.2"
28
35
  jupyter = "^1.0.0"
29
- pytest = "^8.3.5"
30
- pytest-cov = "^6.0.0"
31
36
  pre-commit = "^4.2.0"
32
- folium = "^0.19.5"
33
- matplotlib = "^3.10.1"
34
- mapclassify = "^2.8.1"
35
- mkdocs = "^1.6.1"
36
- mkdocstrings = {extras = ["python"], version = "^0.29.1"}
37
- mkdocs-material = "^9.6.14"
38
- mike = "^2.1.3"
37
+
38
+ [tool.poetry.group.docs.dependencies]
39
+ sphinx = "^8.0.0"
40
+ furo = "^2025.9.25"
41
+ myst-nb = "^1.1.0"
42
+ sphinx-autodoc-typehints = "^3.2.0"
43
+ sphinx-copybutton = "^0.5.2"
44
+ sphinx-design = "^0.6.0"
45
+ myst-parser = "^4.0.1"
46
+ linkify-it-py = "^2.0.3"
39
47
 
40
48
  [build-system]
41
49
  requires = ["poetry-core"]
@@ -43,7 +51,7 @@ build-backend = "poetry.core.masonry.api"
43
51
 
44
52
  [tool.black]
45
53
  line-length = 120
46
- target-version = ['py310']
54
+ target-version = ['py311']
47
55
 
48
56
  [tool.pylint.format]
49
57
  max-line-length = 120
@@ -30,7 +30,6 @@ class Config:
30
30
  ):
31
31
  self.enable_tqdm_bar = enable_tqdm_bar
32
32
  self.logger = logger
33
- self.pandarallel_use_file_system = False
34
33
 
35
34
  def change_logger_lvl(self, lvl: Literal["TRACE", "DEBUG", "INFO", "WARN", "ERROR"]):
36
35
  self.logger.remove()
@@ -39,9 +38,6 @@ class Config:
39
38
  def set_enable_tqdm(self, enable: bool):
40
39
  self.enable_tqdm_bar = enable
41
40
 
42
- def set_pandarallel_use_file_system(self, enable: bool):
43
- self.pandarallel_use_file_system = enable
44
-
45
41
 
46
42
  config = Config()
47
43
  config.change_logger_lvl("INFO")
@@ -0,0 +1 @@
1
+ VERSION = "1.3.0"
@@ -27,20 +27,27 @@ def get_graph_coverage(
27
27
  4. Combining reachability information with Voronoi cells
28
28
  5. Clipping results to specified zone boundary
29
29
 
30
- Parameters:
30
+ Args:
31
31
  gdf_to (gpd.GeoDataFrame):
32
32
  Source points to which coverage is calculated.
33
+
33
34
  nx_graph (nx.Graph):
34
35
  NetworkX graph representing the transportation network.
35
- weight_type (Literal["time_min", "length_meter"]):
36
- Edge attribute to use as weight for path calculations.
36
+
37
+ weight_type:
38
+ Type of edge weight to use for path calculation:
39
+
40
+ - ``"time_min"``: Edge travel time in minutes
41
+ - ``"length_meter"``: Edge length in meters
42
+
37
43
  weight_value_cutoff (float):
38
44
  Maximum weight value for path calculations (e.g., max travel time/distance).
45
+
39
46
  zone (gpd.GeoDataFrame):
40
47
  Boundary polygon to clip the resulting coverage zones. If None, concave hull of reachable nodes will be used.
41
48
 
42
49
  Returns:
43
- (gpd.GeoDataFrame):
50
+ gpd.GeoDataFrame:
44
51
  GeoDataFrame with coverage zones polygons, each associated with its source point, returns in the same CRS
45
52
  as original gdf_from.
46
53
 
@@ -6,16 +6,18 @@ def get_radius_coverage(gdf_from: gpd.GeoDataFrame, radius: float, resolution: i
6
6
  """
7
7
  Calculate radius-based coverage zones using Voronoi polygons.
8
8
 
9
- Parameters:
9
+ Args:
10
10
  gdf_from (gpd.GeoDataFrame):
11
11
  Source points for which coverage zones are calculated.
12
+
12
13
  radius (float):
13
14
  Maximum coverage radius in meters.
15
+
14
16
  resolution (int):
15
17
  Number of segments used to approximate quarter-circle in buffer (default=32).
16
18
 
17
19
  Returns:
18
- (gpd.GeoDataFrame):
20
+ gpd.GeoDataFrame:
19
21
  GeoDataFrame with smoothed coverage zone polygons in the same CRS as original gdf_from.
20
22
 
21
23
  Notes:
@@ -31,30 +31,40 @@ def get_stepped_graph_coverage(
31
31
  4. Aggregates zones into stepped coverage layers
32
32
  5. Optionally clips results to a boundary zone
33
33
 
34
- Parameters:
34
+ Args:
35
35
  gdf_to (gpd.GeoDataFrame):
36
36
  Source points from which stepped coverage is calculated.
37
+
37
38
  nx_graph (nx.Graph):
38
39
  NetworkX graph representing the transportation network.
39
- weight_type (Literal["time_min", "length_meter"]):
40
+
41
+ weight_type:
40
42
  Type of edge weight to use for path calculation:
41
- - "time_min": Edge travel time in minutes
42
- - "length_meter": Edge length in meters
43
- step_type (Literal["voronoi", "separate"]):
43
+
44
+ - ``"time_min"``: Edge travel time in minutes
45
+ - ``"length_meter"``: Edge length in meters
46
+
47
+ step_type:
44
48
  Method for generating stepped zones:
45
- - "voronoi": Stepped zones based on Voronoi polygons around graph nodes
46
- - "separate": Independent buffer zones per step
49
+
50
+ - ``"voronoi"``: Stepped zones based on Voronoi polygons around graph nodes
51
+ - ``"separate"``: Independent buffer zones per step
52
+
47
53
  weight_value_cutoff (float, optional):
48
54
  Maximum weight value (e.g., max travel time or distance) to limit the coverage extent.
55
+
49
56
  zone (gpd.GeoDataFrame, optional):
50
57
  Optional boundary polygon to clip resulting stepped zones. If None, concave hull of reachable area is used.
58
+
51
59
  step (float, optional):
52
60
  Step interval for coverage zone construction. Defaults to:
53
- - 100 meters for distance-based weight
54
- - 1 minute for time-based weight
61
+
62
+ - 100 meters for distance-based weight
63
+ - 1 minute for time-based weight
55
64
 
56
65
  Returns:
57
- (gpd.GeoDataFrame): GeoDataFrame with polygons representing stepped coverage zones for each input point,
66
+ gpd.GeoDataFrame:
67
+ GeoDataFrame with polygons representing stepped coverage zones for each input point,
58
68
  annotated by step range.
59
69
 
60
70
  Notes:
@@ -31,33 +31,44 @@ def get_accessibility_isochrone_stepped(
31
31
  """
32
32
  Calculate stepped accessibility isochrones for a single point with specified intervals.
33
33
 
34
- Parameters:
35
- isochrone_type (Literal["radius", "ways", "separate"]):
34
+ Args:
35
+ isochrone_type:
36
36
  Visualization method for stepped isochrones:
37
- - "radius": Voronoi-based in circular buffers
38
- - "ways": Voronoi-based in road network polygons
39
- - "separate": Circular buffers for each step
37
+
38
+ - ``"radius"``: Voronoi-based in circular buffers
39
+ - ``"ways"``: Voronoi-based in road network polygons
40
+ - ``"separate"``: Circular buffers for each step
41
+
40
42
  point (gpd.GeoDataFrame):
41
43
  Single source point for isochrone calculation (uses first geometry if multiple provided).
44
+
42
45
  weight_value (float):
43
46
  Maximum travel time (minutes) or distance (meters) threshold.
44
- weight_type (Literal["time_min", "length_meter"]):
47
+
48
+ weight_type:
45
49
  Type of weight calculation:
50
+
46
51
  - "time_min": Time-based in minutes
47
52
  - "length_meter": Distance-based in meters
53
+
48
54
  nx_graph (nx.Graph):
49
55
  NetworkX graph representing the transportation network.
56
+
50
57
  step (float, optional):
51
58
  Interval between isochrone steps. Defaults to:
59
+
52
60
  - 100 meters for distance-based
53
61
  - 1 minute for time-based
62
+
54
63
  **kwargs: Additional parameters:
64
+
55
65
  - buffer_factor: Size multiplier for buffers (default: 0.7)
56
66
  - road_buffer_size: Buffer size for road edges in meters (default: 5)
57
67
 
58
68
  Returns:
59
- (tuple[gpd.GeoDataFrame, gpd.GeoDataFrame | None, gpd.GeoDataFrame | None]):
69
+ tuple[gpd.GeoDataFrame, gpd.GeoDataFrame | None, gpd.GeoDataFrame | None]:
60
70
  Tuple containing:
71
+
61
72
  - stepped_isochrones: GeoDataFrame with stepped polygons and distance/time attributes
62
73
  - pt_stops: Public transport stops within isochrones (if available)
63
74
  - pt_routes: Public transport routes within isochrones (if available)
@@ -150,29 +161,38 @@ def get_accessibility_isochrones(
150
161
  - 'radius': Circular buffer-based isochrones
151
162
  - 'ways': Road network-based isochrones
152
163
 
153
- Parameters:
154
- isochrone_type (Literal["radius", "ways"]):
164
+ Args:
165
+ isochrone_type:
155
166
  Type of isochrone to calculate:
167
+
156
168
  - "radius": Creates circular buffers around reachable nodes
157
169
  - "ways": Creates polygons based on reachable road network
170
+
158
171
  points (gpd.GeoDataFrame):
159
172
  GeoDataFrame containing source points for isochrone calculation.
173
+
160
174
  weight_value (float):
161
175
  Maximum travel time (minutes) or distance (meters) threshold.
162
- weight_type (Literal["time_min", "length_meter"]):
176
+
177
+ weight_type:
163
178
  Type of weight calculation:
179
+
164
180
  - "time_min": Time-based accessibility in minutes
165
181
  - "length_meter": Distance-based accessibility in meters
182
+
166
183
  nx_graph (nx.Graph):
167
184
  NetworkX graph representing the transportation network.
168
185
  Must contain CRS and speed attributes for time calculations.
186
+
169
187
  **kwargs: Additional parameters:
188
+
170
189
  - buffer_factor: Size multiplier for buffers (default: 0.7)
171
190
  - road_buffer_size: Buffer size for road edges in meters (default: 5)
172
191
 
173
192
  Returns:
174
- (tuple[gpd.GeoDataFrame, gpd.GeoDataFrame | None, gpd.GeoDataFrame | None]):
193
+ tuple[gpd.GeoDataFrame, gpd.GeoDataFrame | None, gpd.GeoDataFrame | None]:
175
194
  Tuple containing:
195
+
176
196
  - isochrones: GeoDataFrame with calculated isochrone polygons
177
197
  - pt_stops: Public transport stops within isochrones (if available)
178
198
  - pt_routes: Public transport routes within isochrones (if available)