Isochrones

Overview

An isochrone is the area reachable from an origin within a travel-time or distance budget along a transport network. ObjectNat builds isochrones on an iduedu.UrbanGraph prepared by IduEdu (walk, drive, public transport or intermodal graph). objectnat.get_graph_isochrones() returns one polygon per origin; objectnat.get_stepped_graph_isochrones() splits the reachable area into bands of width step.

Method

  1. Every origin is snapped to its nearest graph node, or node ids are taken from graph_node_column or origin_nodes.

  2. A Dijkstra search runs outward from the origins along the edge direction, with edge weights time_min (minutes, default) or length_meter (metres), up to weight_value_cutoff. The searches of all origins run in one parallel call of IduEdu’s Numba routines.

  3. The reachable nodes are turned into a polygon according to geometry_type. The residual budget of a node (cutoff minus its cost) is converted to a distance. For time_min, the conversion uses the median speed (length_meter / time_min) of edges between nodes reached from that origin (walk edges on walk and intermodal graphs). When these edges have usable speeds, unreached parts of the graph do not affect the conversion. The geometry is then built as follows:

    • "radius" (default): union of buffers around the reachable nodes; the radius of a buffer is the residual distance of its node, but at most off_network_distance (150 m by default);

    • "ways": reachable edges buffered by road_buffer_size metres, limited by buffers of the full residual distance;

    • "separate": buffers of buffer_factor × residual distance around the reachable nodes, merged into one polygon.

  4. The result is clipped to zone when it is given.

Why the radius is capped. A buffer by the whole residual distance assumes that a person can walk straight from a node in any direction for the rest of the budget, across blocks, courtyards and water. At the origin this is the whole budget, so a 10-minute walk isochrone becomes a disc of about 800 m whatever the street layout. The cap follows the approach of trip planners such as OpenTripPlanner and Conveyal R5: the search runs along the network, and only the last stretch from a street to a place, at most off_network_distance, is walked off the network. The isochrone then follows the streets that are actually reachable and narrows where they end. off_network_distance=None gives the uncapped buffers.

On walk and intermodal graphs only pedestrian edges (type == "walk") shape "ways", and only their end nodes shape any geometry: transit route nodes take part in the search, but their cost includes the boarding wait, and several route nodes can share one stop location.

Stepped isochrones assign every reachable node to the interval [0, step), [step, 2·step), … that contains its cost, up to weight_value_cutoff (by default the cost of the farthest reachable node), and build one band per interval: geometry_type=None uses Voronoi cells around the nodes, "radius" and "ways" clip these cells to the residual-radius buffers or to the buffered streets, and "separate" builds independent buffers per interval. With several origins, the bands describe their combined reachability: each node keeps the cost from its nearest origin. The column dist contains the upper bound of the interval.

Outputs

GeoDataFrames in the CRS of the input origins. objectnat.get_graph_isochrones() has one row per origin with source_node and the input attributes; objectnat.get_stepped_graph_isochrones() has one row per band and the column dist (minutes or metres).

objectnat.get_graph_isochrones(urban_graph, *, weight_value_cutoff, gdf_origins=None, origin_nodes=None, graph_node_column='graph_node_id', weight_type='time_min', geometry_type='radius', zone=None, buffer_factor=0.7, road_buffer_size=5.0, off_network_distance=150.0, max_workers=None)[source]

Calculate accessibility isochrones from origin objects over an urban graph.

An isochrone is the area reachable from an origin within weight_value_cutoff. Unlike coverage, each origin gets its own independent isochrone, but all shortest-path searches run in a single parallel Numba call. The function:

  1. Snaps each origin to its nearest graph node (or uses the provided origin_nodes).

  2. Runs one Dijkstra search per origin in parallel.

  3. Builds a reachability polygon for each origin with the selected geometry_type.

  4. Optionally clips each isochrone to zone.

Parameters:
  • urban_graph (UrbanGraph) – City graph with node and edge tables.

  • weight_value_cutoff (float) – Maximum travel time (minutes) or distance (metres) defining the isochrone extent.

  • gdf_origins (geopandas.GeoDataFrame, optional) – Origin objects. If the table contains graph_node_column those ids are used; otherwise geometries are snapped to nearest nodes. Pass either this or origin_nodes.

  • origin_nodes (Iterable, optional) – Ready-made origin node ids, used instead of gdf_origins.

  • graph_node_column (str) – Name of the graph node id column in gdf_origins.

  • weight_type (Literal['time_min', 'length_meter']) –

    Type of edge weight used for path calculation:

    • "time_min": time-based accessibility in minutes

    • "length_meter": distance-based accessibility in metres

  • geometry_type (Literal['radius', 'ways', 'separate']) –

    Method used to build each isochrone:

    • "radius": union of buffers around the reachable nodes by their remaining budget as a distance, at most off_network_distance

    • "ways": buffered reachable road geometry (walk edges only on intermodal/walk graphs)

    • "separate": buffers of buffer_factor × residual distance around the reachable nodes, merged into one polygon

  • zone (gpd.GeoDataFrame | gpd.GeoSeries, optional) – Boundary polygon to clip the resulting isochrones.

  • buffer_factor (float) – Buffer multiplier used by geometry_type="separate" (default 0.7).

  • road_buffer_size (float) – Edge buffer for geometry_type="ways", in metres (default 5.0).

  • off_network_distance (float | None, optional) – For geometry_type="radius": how far from the network, in metres, a place may lie and still count as reached. Every reachable node is buffered by its remaining budget converted to a distance, but by no more than this, so the area follows the network instead of growing into a straight-line circle around the start. None buffers by the whole remaining budget. Defaults to 150.

  • max_workers (int, optional) – Number of parallel Numba threads. Defaults to the Numba runtime.

Returns:

One isochrone polygon per origin with a source_node column and geometry, returned in the CRS of gdf_origins (or the graph CRS). The index matches gdf_origins / origin_nodes.

Return type:

gpd.GeoDataFrame

Notes

  • For geometry_type="ways" the search budget is slightly extended so road edges are not clipped short of the boundary.

  • Origins with no reachable nodes are dropped from the result.

  • On walk and intermodal graphs the geometry is built from nodes reachable on foot; transit route nodes, whose distance includes the wait to board, only take part in the search.

objectnat.get_stepped_graph_isochrones(urban_graph, *, gdf_origins=None, origin_nodes=None, graph_node_column='graph_node_id', weight_type='time_min', geometry_type='radius', weight_value_cutoff=None, zone=None, step=None, buffer_factor=0.7, road_buffer_size=5.0, off_network_distance=150.0)[source]

Calculate stepped accessibility isochrones from origin objects over an urban graph, splitting each reachable area into concentric bands of width step.

Unlike coverage, the search runs outward from the origins (along the original edge direction on a directed graph). The function:

  1. Snaps each origin to its nearest graph node (or uses the provided origin_nodes).

  2. Runs a multi-source Dijkstra search outward from the origins.

  3. Buckets reachable nodes into steps and builds banded geometry with the selected geometry_type.

  4. Optionally clips the bands to zone.

Parameters:
  • urban_graph (UrbanGraph) – City graph with node and edge tables.

  • gdf_origins (geopandas.GeoDataFrame, optional) – Origin objects. If the table contains graph_node_column those ids are used; otherwise geometries are snapped to nearest nodes. Pass either this or origin_nodes.

  • origin_nodes (Iterable, optional) – Ready-made origin node ids, used instead of gdf_origins.

  • graph_node_column (str) – Name of the graph node id column in gdf_origins.

  • weight_type (Literal['time_min', 'length_meter']) –

    Type of edge weight used for path calculation:

    • "time_min": time-based accessibility in minutes

    • "length_meter": distance-based accessibility in metres

  • geometry_type (Optional[Literal['radius', 'ways', 'separate']]) –

    Method used to build each step’s geometry:

    • None: Voronoi cells around graph nodes

    • "radius": Voronoi cells clipped to the radius buffers (see off_network_distance)

    • "ways": Voronoi cells clipped to buffered road geometry (walk edges only on intermodal/walk graphs)

    • "separate": independent circular buffers per step

  • weight_value_cutoff (float, optional) – Maximum travel time or distance. If None, the isochrone is built out to the farthest reachable node.

  • zone (gpd.GeoDataFrame | gpd.GeoSeries, optional) – Boundary polygon to clip the resulting stepped isochrones.

  • step (float, optional) – Width of each step, in units of weight_type. Defaults to 100 metres for length_meter and 1 minute for time_min.

  • buffer_factor (float) – Buffer multiplier used by geometry_type="separate" (default 0.7).

  • road_buffer_size (float) – Edge buffer for geometry_type="ways", in metres (default 5.0).

  • off_network_distance (float | None, optional) – For geometry_type="radius": how far from the network, in metres, a place may lie and still count as reached. Every reachable node is buffered by its remaining budget converted to a distance, but by no more than this, so the area follows the network instead of growing into a straight-line circle around the start. None buffers by the whole remaining budget. Defaults to 150.

Returns:

Stepped isochrone polygons with a dist column (the upper bound of each step, in units of weight_type) and geometry, returned in the CRS of gdf_origins (or the graph CRS).

Return type:

gpd.GeoDataFrame

Notes

  • Multiple origins are processed together: the bands describe the combined reachability of all origins (each node keeps the distance to its nearest origin).

  • On walk and intermodal graphs the bands are built from nodes reachable on foot, so a stop is drawn in the band it is walked to, not in the bands of the waits for the vehicles that call there.

  • An empty GeoDataFrame is returned when nothing is reachable.

Figures

Isochrones with geometry_type ways and radius, and isochrones of three origins

15-minute isochrone on the intermodal graph of Vasilyevsky Island with geometry_type="ways" and "radius", and 8-minute "radius" isochrones of three origins (one polygon per origin). Background: pedestrian streets of the graph and the district boundary.

Stepped isochrones with geometry_type ways, radius and separate

Stepped isochrones up to 15 minutes in bands of 3 minutes, geometry_type="ways", "radius" and "separate"; dist is the upper bound of the band. Background: pedestrian streets of the graph and the district boundary.

Limitations

  • Travel times are those stored in the graph (time_min); congestion, timetables beyond the waiting times modelled by IduEdu, and turn penalties are not considered.

  • The polygon outside the network is an interpolation. "radius" assumes straight-line movement for at most off_network_distance from the streets; "separate" assumes it for the whole residual budget and therefore overestimates reach across blocks without paths.

  • Origins are snapped to the nearest graph node; the access distance from the origin to that node is not added.

Example notebook

Isochrones