ObjectNat 1.2.2__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.
- objectnat-1.3.0/PKG-INFO +201 -0
- objectnat-1.3.0/README.rst +179 -0
- {objectnat-1.2.2 → objectnat-1.3.0}/pyproject.toml +23 -15
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/_api.py +14 -14
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/_config.py +43 -47
- objectnat-1.3.0/src/objectnat/_version.py +1 -0
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/coverage_zones/__init__.py +3 -3
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/coverage_zones/graph_coverage.py +11 -4
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/coverage_zones/radius_voronoi_coverage.py +4 -2
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/coverage_zones/stepped_coverage.py +20 -10
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/isochrones/__init__.py +1 -1
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/isochrones/isochrone_utils.py +167 -167
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/isochrones/isochrones.py +31 -11
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/noise/__init__.py +3 -3
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/noise/noise_init_data.py +10 -10
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/noise/noise_reduce.py +155 -155
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/noise/noise_simulation.py +14 -13
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/noise/noise_simulation_simplified.py +10 -9
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/point_clustering/__init__.py +1 -1
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/point_clustering/cluster_points_in_polygons.py +3 -3
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/provision/__init__.py +1 -1
- objectnat-1.3.0/src/objectnat/methods/provision/provision.py +213 -0
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/provision/provision_exceptions.py +59 -59
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/provision/provision_model.py +323 -348
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/utils/__init__.py +1 -1
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/utils/geom_utils.py +173 -173
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/utils/graph_utils.py +5 -5
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/utils/math_utils.py +32 -32
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/visibility/__init__.py +6 -6
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/visibility/visibility_analysis.py +9 -17
- objectnat-1.2.2/PKG-INFO +0 -116
- objectnat-1.2.2/README.md +0 -92
- objectnat-1.2.2/src/objectnat/_version.py +0 -1
- objectnat-1.2.2/src/objectnat/methods/provision/provision.py +0 -121
- {objectnat-1.2.2 → objectnat-1.3.0}/LICENSE.txt +0 -0
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/__init__.py +0 -0
- {objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/__init__.py +0 -0
objectnat-1.3.0/PKG-INFO
ADDED
|
@@ -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.
|
|
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.
|
|
7
|
+
readme = "README.rst"
|
|
8
8
|
|
|
9
9
|
packages = [{ include = "objectnat", from = "src" }]
|
|
10
10
|
|
|
11
11
|
[tool.poetry.dependencies]
|
|
12
|
-
python = ">=3.
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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 = ['
|
|
54
|
+
target-version = ['py311']
|
|
47
55
|
|
|
48
56
|
[tool.pylint.format]
|
|
49
57
|
max-line-length = 120
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
# pylint: disable=unused-import,wildcard-import,unused-wildcard-import
|
|
2
|
-
|
|
3
|
-
from .methods.coverage_zones import get_graph_coverage, get_radius_coverage, get_stepped_graph_coverage
|
|
4
|
-
from .methods.isochrones import get_accessibility_isochrone_stepped, get_accessibility_isochrones
|
|
5
|
-
from .methods.noise import calculate_simplified_noise_frame, simulate_noise
|
|
6
|
-
from .methods.point_clustering import get_clusters_polygon
|
|
7
|
-
from .methods.provision import clip_provision, get_service_provision, recalculate_links
|
|
8
|
-
from .methods.utils import gdf_to_graph, graph_to_gdf
|
|
9
|
-
from .methods.visibility import (
|
|
10
|
-
calculate_visibility_catchment_area,
|
|
11
|
-
get_visibilities_from_points,
|
|
12
|
-
get_visibility,
|
|
13
|
-
get_visibility_accurate,
|
|
14
|
-
)
|
|
1
|
+
# pylint: disable=unused-import,wildcard-import,unused-wildcard-import
|
|
2
|
+
|
|
3
|
+
from .methods.coverage_zones import get_graph_coverage, get_radius_coverage, get_stepped_graph_coverage
|
|
4
|
+
from .methods.isochrones import get_accessibility_isochrone_stepped, get_accessibility_isochrones
|
|
5
|
+
from .methods.noise import calculate_simplified_noise_frame, simulate_noise
|
|
6
|
+
from .methods.point_clustering import get_clusters_polygon
|
|
7
|
+
from .methods.provision import clip_provision, get_service_provision, recalculate_links
|
|
8
|
+
from .methods.utils import gdf_to_graph, graph_to_gdf
|
|
9
|
+
from .methods.visibility import (
|
|
10
|
+
calculate_visibility_catchment_area,
|
|
11
|
+
get_visibilities_from_points,
|
|
12
|
+
get_visibility,
|
|
13
|
+
get_visibility_accurate,
|
|
14
|
+
)
|
|
@@ -1,47 +1,43 @@
|
|
|
1
|
-
import sys
|
|
2
|
-
from typing import Literal
|
|
3
|
-
|
|
4
|
-
from loguru import logger
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class Config:
|
|
8
|
-
"""
|
|
9
|
-
A configuration class to manage global settings for the application, such as Overpass API URL,
|
|
10
|
-
timeouts, and logging options.
|
|
11
|
-
|
|
12
|
-
Attributes
|
|
13
|
-
----------
|
|
14
|
-
enable_tqdm_bar : bool
|
|
15
|
-
Enables or disables progress bars (via tqdm). Defaults to True.
|
|
16
|
-
logger : Logger
|
|
17
|
-
Logging instance to handle application logging.
|
|
18
|
-
|
|
19
|
-
Methods
|
|
20
|
-
-------
|
|
21
|
-
change_logger_lvl(lvl: Literal["TRACE", "DEBUG", "INFO", "WARN", "ERROR"])
|
|
22
|
-
Changes the logging level to the specified value.
|
|
23
|
-
set_enable_tqdm(enable: bool)
|
|
24
|
-
Enables or disables progress bars in the application.
|
|
25
|
-
"""
|
|
26
|
-
|
|
27
|
-
def __init__(
|
|
28
|
-
self,
|
|
29
|
-
enable_tqdm_bar=True,
|
|
30
|
-
):
|
|
31
|
-
self.enable_tqdm_bar = enable_tqdm_bar
|
|
32
|
-
self.logger = logger
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
self.logger.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
config = Config()
|
|
47
|
-
config.change_logger_lvl("INFO")
|
|
1
|
+
import sys
|
|
2
|
+
from typing import Literal
|
|
3
|
+
|
|
4
|
+
from loguru import logger
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Config:
|
|
8
|
+
"""
|
|
9
|
+
A configuration class to manage global settings for the application, such as Overpass API URL,
|
|
10
|
+
timeouts, and logging options.
|
|
11
|
+
|
|
12
|
+
Attributes
|
|
13
|
+
----------
|
|
14
|
+
enable_tqdm_bar : bool
|
|
15
|
+
Enables or disables progress bars (via tqdm). Defaults to True.
|
|
16
|
+
logger : Logger
|
|
17
|
+
Logging instance to handle application logging.
|
|
18
|
+
|
|
19
|
+
Methods
|
|
20
|
+
-------
|
|
21
|
+
change_logger_lvl(lvl: Literal["TRACE", "DEBUG", "INFO", "WARN", "ERROR"])
|
|
22
|
+
Changes the logging level to the specified value.
|
|
23
|
+
set_enable_tqdm(enable: bool)
|
|
24
|
+
Enables or disables progress bars in the application.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
def __init__(
|
|
28
|
+
self,
|
|
29
|
+
enable_tqdm_bar=True,
|
|
30
|
+
):
|
|
31
|
+
self.enable_tqdm_bar = enable_tqdm_bar
|
|
32
|
+
self.logger = logger
|
|
33
|
+
|
|
34
|
+
def change_logger_lvl(self, lvl: Literal["TRACE", "DEBUG", "INFO", "WARN", "ERROR"]):
|
|
35
|
+
self.logger.remove()
|
|
36
|
+
self.logger.add(sys.stderr, level=lvl)
|
|
37
|
+
|
|
38
|
+
def set_enable_tqdm(self, enable: bool):
|
|
39
|
+
self.enable_tqdm_bar = enable
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
config = Config()
|
|
43
|
+
config.change_logger_lvl("INFO")
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VERSION = "1.3.0"
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
from .graph_coverage import get_graph_coverage
|
|
2
|
-
from .radius_voronoi_coverage import get_radius_coverage
|
|
3
|
-
from .stepped_coverage import get_stepped_graph_coverage
|
|
1
|
+
from .graph_coverage import get_graph_coverage
|
|
2
|
+
from .radius_voronoi_coverage import get_radius_coverage
|
|
3
|
+
from .stepped_coverage import get_stepped_graph_coverage
|
|
@@ -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
|
-
|
|
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
|
-
|
|
36
|
-
|
|
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
|
-
|
|
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
|
|
{objectnat-1.2.2 → objectnat-1.3.0}/src/objectnat/methods/coverage_zones/radius_voronoi_coverage.py
RENAMED
|
@@ -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
|
-
|
|
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
|
-
|
|
20
|
+
gpd.GeoDataFrame:
|
|
19
21
|
GeoDataFrame with smoothed coverage zone polygons in the same CRS as original gdf_from.
|
|
20
22
|
|
|
21
23
|
Notes:
|