ObjectNat¶
Object-level network and spatial analysis for cities¶
ObjectNat is an open-source Python library for spatial analysis of urban objects: buildings, services, street observers and noise sources. It is developed by the IDU team at ITMO University.
Overview¶
ObjectNat works with GeoPandas data and with street graphs (iduedu.UrbanGraph) built by
IduEdu from OpenStreetMap and GTFS. Every method page describes what is
computed, the algorithm, the parameters and outputs with units, an example figure and the limitations.
Method |
Result |
Functions |
|---|---|---|
Area reachable from origins within a time (min) or distance (m) budget on a graph |
||
Non-overlapping zones served by each service within a budget |
|
|
Allocation of building demand to services of limited capacity within a cost threshold |
|
|
Visibility polygons and isovist metrics (2D), viewsheds over building heights and terrain (2.5D), catchment zones of many observers |
|
|
Sound levels (dB) around point, line and polygon sources among obstacles and vegetation |
|
|
Direct sun hours on the ground and on facades per floor, for a day or a period |
||
Grid results as rasters: matplotlib plots, GeoTIFF files, folium web-map overlays |
||
Straight skeleton of polygons: centre lines with the local width, faces of hipped roofs |
The computationally intensive parts (exact visibility, 2.5D lines of sight, insolation, receiver-grid noise and
provision allocation) run in parallel threads in a compiled Rust extension, objectnat._rust; graph searches use
IduEdu’s Numba-accelerated Dijkstra routines. Examples contains an executable notebook for
every method.
Installation¶
pip install objectnat
ObjectNat supports Python 3.11–3.14 on Linux, macOS and Windows and installs IduEdu 2.4.2 or newer, 3.x
included. Wheels contain the compiled extension, so pip needs no compiler; building from a source checkout requires
a Rust toolchain (rustup). Reading GeoTIFF terrain for insolation and viewsheds requires the
optional rasterio package. Changes for code written for 2.x are listed in Upgrading to 3.0.
Quickstart¶
Graph-based methods take an iduedu.UrbanGraph. IduEdu can download a Geofabrik extract, cut the
territory out of it and build the graph from the local file instead of the Overpass API (IduEdu 2.x
needs pip install "iduedu[pbf]" for cutting, 3.x cuts without extras):
import geopandas as gpd
import iduedu
from iduedu import get_4326_boundary, get_intermodal_graph
from shapely.geometry import Point
from objectnat import get_stepped_graph_isochrones
# Vasilyevsky Island district, Saint Petersburg (OSM relation 1114252)
with iduedu.use_pbf(osm_id=1114252, region="northwestern-fed-district"):
boundary = get_4326_boundary(osm_id=1114252)
graph = get_intermodal_graph(territory=boundary, clip_by_territory=True)
origins = gpd.GeoDataFrame(geometry=[Point(30.2706, 59.9355)], crs=4326)
bands = get_stepped_graph_isochrones(
graph,
gdf_origins=origins,
weight_type="time_min",
weight_value_cutoff=10, # minutes
step=2,
geometry_type="separate",
)
Without the with block the same calls query the Overpass API.
Methods without a graph take GeoDataFrames directly, for example sun hours among buildings with a storeys column:
from objectnat import get_insolation
receivers = get_insolation(buildings, "2026-06-21", height_column=None, storeys_column="storeys_count")
Configuration¶
from objectnat import config
config.change_logger_lvl("INFO") # hide debug messages
config.set_enable_tqdm(False) # disable progress bars
Contributing, contacts and citation¶
Issues and pull requests are welcome on GitHub; the workflow is described
in CONTRIBUTING.md.
NCCR, National Center for Cognitive Research
IDU, Institute of Design and Urban Studies
Natalya Chichkova, project manager
Danila Oleynikov (Donny), lead software engineer
ObjectNat is distributed under the BSD 3-Clause license (LICENSE.txt). To cite it, use the metadata in
CITATION.cff (on GitHub, Cite this repository
exports it as APA or BibTeX). Publications describing ObjectNat will be listed here.