Node 1.201 · CONCEPTTechnical Note08 MIN READ
Published: 6 Nov 2026

Street Networks: 2018 vs. 2026

Migrating spatial street network analysis from OSMnx v0.8 (2018) to OSMnx v2.0 (2026)

Abstract

Documenting API architecture changes, GeoPandas 1.0 pipelines, and workflow reproducibility after an eight-year gap.

Context

When I came back from Bangkok in July 2026 with a field log of 18 GrabCar and GrabBike rides, I knew the empirical ride times were only half the story. To prove why a motorbike moved nearly three times faster than a car across Sukhumvit and Silom, I needed to pull the actual street graph and measure its topology.

I already had the exact toolkit in mind. Back in 2018, I built a series of Jupyter notebooks using Geoff Boeing’s OSMnx library (v0.8) to compare the urban morphology of colonial port cities across Asia alongside major Western grids. I generated one-square-kilometre matrices, street orientation polar histograms, and walking across four distinct groupings:

  • Java Sea: Surabaya (Semolowaru, Gubeng Baru, Kenjeran, Citraland, Babatan), Semarang (Simpang Lima, Panggung Lor, Bandarharjo, Mugassari, Gabahan), and Makassar (Melayu, Malimongan Tua, Maccini Gusung, Sambung Jawa, Mannuruki).
  • South China Sea: Hong Kong (Mid-Levels, Mong Kok, Kwai Chung, To Kwa Wan, South Island), Manila (Tondo, Sampaloc, Quiapo, Intramuros, Malate), and Saigon (Districts 1, 3, 5, 7, and Thao Dien).
  • Straits of Melaka: Penang (George Town, Gurney Drive, Pulau Tikus, Farlim, Bayan Baru), Melaka (Jonker Street, Dutch Square, Malim Jaya, Taman Mahajaya, Melaka Sentral), and Singapore (Newton, Novena, Bukit Merah, Tiong Bahru, Little India).
  • US & Europe Baselines: New York (Times Square, Upper East Side, East Village, Turtle Bay, Harlem) and Paris (Arc de Triomphe, Montmartre, Île de la Cité, Canal Saint-Martin, Saint-Germain-des-Prés).

My plan was simple: open the 2018 notebooks, swap the Surabaya and Hong Kong coordinates for Sukhumvit and Rama IV, and run the cells.

Every single cell threw a DeprecationWarning, a TypeError, or an AttributeError.

Eight years is an eternity in the Python geospatial ecosystem. Between 2018 and 2026, OSMnx moved from v0.8 to v2.0, GeoPandas crossed the 1.0 threshold, Shapely 2.0 rewrote its geometry engine in C, and the legacy PyProj / Rtree C-library dependencies that used to break every Conda environment were completely overhauled.

Before I could test a single soi in Bangkok for Node 1.3, I had to migrate my own legacy code. Right now, this note has the maturity state of 01 // CONCEPT. It is the technical migration ledger documenting what broke between 2018 and 2026, why the API changed for the better, and how to write reproducible spatial pipelines today.

The Migration Ledger

1. Environment & Dependency Shifts

In 2018, installing the geospatial stack on a local machine was a rite of passage. You had to align GDAL, GEOS, PROJ, fiona, and rtree inside a fragile conda-forge environment before you could even import osmnx.

By 2026, the underlying Python spatial stack has flattened and matured:

Layer 2018 Stack (OSMnx v0.8) 2026 Stack (OSMnx v2.0+) What Actually Changed
Core Graph Engine osmnx 0.8.x + networkx 2.1 osmnx 2.0.x + networkx 3.4 Strict type hints, positional-to-keyword argument enforcement, removal of wrapper bloat.
Vector DataFrames geopandas 0.4.x (backed by fiona) geopandas 1.0+ (backed by pyogrio) pyogrio and Arrow-backed I/O replaced fiona as the default engine, cutting read/write times by 5x to 10x.
Geometry Operations shapely 1.6 + rtree shapely 2.0+ (vectorised GEOS) Spatial indexing (STRtree) is now built directly into Shapely and GeoPandas. External rtree wrappers are gone.
CRS & Projections Legacy pyproj (+init=epsg:xxxx) pyproj 3.7+ (WKT2 / OGC strings) Dict-style proj4 strings were deprecated due to axis-order ambiguity; everything runs on modern CRS objects.

2. API Architecture & Breaking Changes

Look at Cell [21] from my original 2018 Jupyter notebook for Gubeng Baru in Surabaya:

python
# 2018 (OSMnx v0.8) - DEPRECATED
place = 'surabaya - gubeng baru'
point = (-7.26533975, 112.752689192925)
fig, ax = ox.plot_figure_ground(point=point, filename=place, dpi=dpi)
Image('{}/{}.{}'.format(img_folder, place, extension), height=size, width=size)

In 2018, ox.plot_figure_ground() was a convenient black box. You passed a (lat, lon) tuple directly into a plotting function, and OSMnx quietly queried the Overpass API in the background, built a graph, buffered the street widths, rendered a Matplotlib figure, and saved a PNG to disk.

In OSMnx v2.0, that same call throws a hard TypeError (missing required argument G): point= no longer downloads a network inside the plot helper. Removed top-level names like ox.get_nearest_node() raise AttributeError instead.

Here is how my three core 2018 workflows translate to the 2026 v2.0 API:

Workflow A: One-Square-Kilometre Figure-Grounds

In v2.0, data acquisition and visualisation are strictly decoupled. Additionally, the point parameter in plot_figure_ground was removed in favour of passing a pre-fetched graph G, and distance across the entire library was renamed to dist (and must be passed as a keyword argument).

python
# 2026 (OSMnx v2.0)
import osmnx as ox

place = "surabaya - gubeng baru"
point = (-7.26533975, 112.752689192925)  # (lat, lon)

# 1. Explicitly fetch the graph first (dist in meters, keyword-only)
G = ox.graph_from_point(point, dist=500, network_type="all", retain_all=True)

# 2. Pass the graph object to the figure-ground renderer
fig, ax = ox.plot_figure_ground(
    G,
    dist=500,
    filepath=f"{img_folder}/{place}.png",
    dpi=300,
    save=True,
    show=False,
    close=True,
)

One deliberate change from the 2018 black box: the old plot_figure_ground(point=…) defaulted to network_type='drive_service'. Here I fetch with network_type="all" so alleys and footways show up in the .

Why is this better? When I generated the city tiles in 2018 (55 neighbourhood samples across the four groupings above), tweaking a visual parameter like line weight or DPI forced the script to hit the all over again. Decoupling graph_from_point from plot_figure_ground lets me serialise the raw graph to a .graphml file once and iterate on the visual styling locally in milliseconds.

Workflow B: Street Network Orientation (Polar Rose Diagrams)

For the 2018 study, I plotted both standard bar histograms and 360-degree polar rose plots of street edge bearings (such as the cardinal grid of Semolowaru in Surabaya versus the radial axes of Arc de Triomphe in Paris).

In v0.8, bearings came from ox.add_edge_bearings(G), then I built the polar rose with custom Matplotlib ( did not ship plot_orientation until v1.1 in 2021). In v2.0, bearing helpers live in ox.bearing, plotting lives in ox.plot, and bearings must be calculated on an unprojected graph (lat/lon degrees). Project to UTM only afterward if you need metric lengths or densities.

python
# 2018 (OSMnx v0.8) - DEPRECATED
G = ox.graph_from_point(point, distance=1000, network_type='drive')
G = ox.add_edge_bearings(G)
# polar rose was custom Matplotlib on edge "bearing" attributes
python
# 2026 (OSMnx v2.0)
G = ox.graph_from_point(point, dist=1000, network_type="drive")

# Convert directed MultiDiGraph to undirected MultiGraph so bidirectional
# streets aren't double-counted in opposite 180-degree bins
Gu = ox.convert.to_undirected(G)
Gu = ox.bearing.add_edge_bearings(Gu)

fig, ax = ox.plot.plot_orientation(
    Gu,
    num_bins=36,
    title="Semolowaru Street Network Edge Bearings",
)

Notice the explicit ox.convert.to_undirected(G) step. In v2.0 you can compute bearings on a directed MultiDiGraph (one bearing per directed edge), but for physical street orientation you usually want an undirected MultiGraph so a two-way street is not weighted twice relative to a one-way street—once at 90° and once at 270°—which skews entropy and orientation order.

Workflow C: Walking Isochrones & Graph-to-GeoDataFrame Conversions

The third piece of my 2018 study mapped 5-, 10-, 15-, 20-, and 25-minute walking across three representations: discrete network nodes, convex hull rings, and buffered street network polygons.

This is where the combination of OSMnx v2.0, NetworkX 3.4, and Shapely 2.0 shines. Five major API signatures changed in this pipeline:

Operation 2018 (v0.8) 2026 (v2.0)
Nearest Node Lookup ox.get_nearest_node(G, (lat, lon)) ox.distance.nearest_nodes(G, X=lon, Y=lat) (Note the X=lon, Y=lat inversion!)
Graph Projection ox.project_graph(G) ox.projection.project_graph(G)
Graph to GeoDataFrame ox.graph_to_gdfs(G) ox.convert.graph_to_gdfs(G)
Shortest Path / Routing nx.shortest_path(...) ox.routing.shortest_path(...) or nx.ego_graph(...)
Polygon Union gdf.unary_union gdf.union_all() ( 1.0 deprecation of unary_union)

That coordinate order swap in ox.distance.nearest_nodes(G, X=lon, Y=lat) is the single biggest trap when migrating old notebooks. In 2018, get_nearest_node took a (lat, lon) tuple. In 2026, nearest_nodes expects planar Cartesian coordinates (X, Y), which means (longitude, latitude) if your graph is unprojected, or (easting, northing) if your graph is already projected to UTM.

3. Reproducibility & OpenStreetMap Data Drift

Even after fixing every API mismatch, running the 2026 script on the exact same (-7.26533975, 112.752689192925) coordinate in Gubeng Baru does not return the exact same graph I plotted in 2018.

Why? Because is a live database. Over the past eight years, local mappers in Surabaya, Manila, and Bangkok have traced thousands of previously unmapped alleys, service roads, and footpath shortcuts.

In OSMnx v2.0, you can control for this temporal drift using ox.settings.overpass_settings. For example:

python
ox.settings.overpass_settings = (
    '[out:json][timeout:{timeout}][date:"2018-06-01T00:00:00Z"]{maxsize}'
)

That [date:…] filter asks for an attic snapshot so I can verify legacy outputs against the 2018 map state, then pull a 2026 snapshot to see how both the physical city and its digital map have evolved.

Synthesis

Rewriting eight-year-old code feels a lot like opening an old Rhino/Grasshopper definition after four major software upgrades: half the components are flagged in red, and the convenience clusters you relied on have been broken down into lower-level primitives.

At first, losing a one-line wrapper like ox.plot_figure_ground(point=point) feels like friction. Once you rebuild the pipeline, you realise the friction is intentional. OSMnx v2.0 forces you to be explicit about coordinate reference systems, graph directionality, and the boundary between network topology and visual rendering.

With the 2026 Python pipeline tested and locked in, I no longer have to rely on visual comparisons alone. I have a clean, fast GeoPandas 1.0 and OSMnx v2.0 workflow ready to point straight at central Bangkok.

Next Steps

This technical migration opens up the spatial analysis nodes for Cluster 01:

Towards Concept (01) - Parallel Research Nodes

  1. Bangkok’s Street Networks (Node 1.3): Running this upgraded OSMnx v2.0 pipeline across the Sukhumvit, Silom, and Song Wat bounding boxes from my field log to measure density (streets_per_node_proportions), , and orientation entropy against the 2018 Asian port city baselines.
  2. Motorbikes in Bangkok’s Infrastructure (Node 1.4): Overlaying my 18 GPS ride trajectories and stands onto the OSMnx street graph to model how two-wheeled routing alters network accessibility.

Towards Built (03)

  1. The API of the Streets (Node 1.5): Synthesising the empirical ride data and the graph topology into a capstone essay on informal high-throughput routing protocols across legacy urban infrastructure.

Changelog

  • 06 Nov 2026 - Publish (v1.0) documenting the migration of 2018 OSMnx v0.8 , polar orientation, and scripts to OSMnx v2.0 and GeoPandas 1.0.