ObjectNat is an open-source Python library for spatial analysis of urban objects (buildings, services, street observers, noise sources), developed by the IDU team at ITMO University. It computes accessibility, coverage and service provision on street graphs from IduEdu, visibility in 2D and over building heights, noise levels and insolation. Inputs and outputs are GeoPandas GeoDataFrames; the computationally intensive parts run in a compiled Rust extension.
Documentation · Examples · Документация на русском
Isochrones (docs, example).
get_graph_isochrones and get_stepped_graph_isochrones return the area reachable from origins within a
travel time (minutes) or network distance (metres) on an iduedu.UrbanGraph, as one polygon per origin or as
bands of width step. The polygon is built from residual-distance buffers around the reachable nodes, at most
off_network_distance (150 m) off the streets ("radius"), from the buffered reachable streets ("ways") or
from merged buffers ("separate").
Coverage zones (docs, example).
get_graph_coverage and get_stepped_graph_coverage assign every place to the service it reaches at the lowest
network cost within a budget (search on the reversed graph, Voronoi cells of graph nodes), so zones do not overlap.
get_radius_coverage is a graph-free variant with a fixed radius.
Service provision (docs, example).
get_service_provision allocates building demand to services with limited capacity using a gravity-based
probabilistic model over a dense or pandas-sparse cost matrix and a normative threshold. It returns a
ProvisionResult with the sparse flow matrix and per-building and per-service metrics (provision_value is the
share of demand supplied within the threshold); helpers join the metrics to GeoDataFrames, build link lines,
drop links beyond a shorter threshold and clip the result to an area.
Visibility (docs, examples: 2D,
2.5D). get_visibility computes the exact visibility polygon (isovist) of
each observer among obstacles treated as walls of infinite height and, with isovist_metrics=True, area,
compactness, occlusivity, radial statistics, drift and visible share; get_isovist_grid maps these metrics over
an area. get_viewshed uses building heights and terrain: a grid cell is visible when the line of sight from the
eye (by default 1.6 m above the ground or a roof) to the cell passes above every wall and the ground.
get_visibility_catchment and get_viewshed_catchment count, for every cell, the observers that see it
(get_observer_points places observers along streets); rasterize draws the counts as a raster.
Noise (docs, example). simulate_noise_grid
computes sound levels on a receiver grid from point, line and polygon sources: direct paths and first-order
reflections with geometric spreading, air absorption, wall absorption and vegetation attenuation, and diffraction
around building corners into their shadows, summed as energies. simulate_noise is a wave-front model fo
98DD
r point
sources with multiple reflections, and calculate_simplified_noise_frame a fast estimate from visibility masks and
distance decay. Ground effect is not modelled. Background: wiki.
Insolation (docs, example).
get_insolation follows the sun (NOAA solar position) through a day or a period and returns, on a ground grid
among buildings of known height and optional terrain (GeoDataFrame, GeoTIFF or array), the daily hours of direct
sun, including ground with no direct sun, the hours on the worst day and the longest continuous sunlit period, for
which insolation norms set a minimum; rasterize draws them as a raster. get_facade_insolation computes the same quantities
for facade points on every floor and checks them against a norm.
With building_details=True, both methods use OSM roof shapes, building parts and raised volumes, and
trees adds shade from tree crowns.
Rasters. Grid results (insolation and noise receivers, catchment cells, isovist fields from
get_isovist_grid) are converted to rasters with rasterize; a Raster can be drawn with matplotlib,
written to a GeoTIFF file or shown on a folium web map with explore.
Straight skeleton (docs).
get_straight_skeleton returns the centre lines of polygons with the distance to the boundary (half the local
width of a road or river polygon) or the faces of a hipped roof over building outlines, in 2D or 3D.
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 include the compiled extension objectnat._rust, so pip needs no compiler. Installing from a
source checkout (pip install .) builds the extension and requires a Rust toolchain
(rustup). GeoTIFF terrain requires the optional rasterio package.
Graph-based methods take an iduedu.UrbanGraph (nodes and edges as GeoDataFrames, edge weights time_min and
length_meter) and use IduEdu's Dijkstra routines; ObjectNat does not build graphs itself. IduEdu
can download a Geofabrik extract and cut the territory out of it, so no Overpass request is needed (IduEdu 2.x
needs pip install "iduedu[pbf]" for cutting, 3.x cuts without extras):
import iduedu
from iduedu import get_4326_boundary, get_intermodal_graph
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)
Without the with block the same calls query the Overpass API.
from objectnat import config
config.change_logger_lvl("INFO") # hide debug messages
config.set_enable_tqdm(False) # disable progress bars
- NCCR, National Center for Cognitive Research
- IDU, Institute of Design and Urban Studies
- Natalya Chichkova, project manager
- Danila Oleynikov (Donny), lead software engineer
Contributions are described in CONTRIBUTING.md.
Citation metadata is kept in CITATION.cff; on GitHub, Cite this repository in the repository sidebar exports it as APA or BibTeX. Publications describing ObjectNat will be listed here.