osmnxr 0.1.6
-
Credit. osmnxr is a port of OSMnx by Geoff Boeing, and earlier releases understated that by calling it “inspired by” OSMnx. The title, description, README, website and package help now say so; the OSMnx MIT copyright notice ships in
inst/COPYRIGHTS;citation("osmnxr")gives Boeing (2025) doi:10.1111/gean.70009 first; and the documentation states that the port was AI-assisted and that the package is not affiliated with the OSMnx project.
A parity pass against what OSMnx gained in 2025–2026 (releases 2.0.1–2.1.1), plus the OSMnx 2.0 features the simplification/consolidation step was missing. The Rust core is now a crate of its own.
The graph algorithms (CSR graph, Dijkstra, Yen, Pareto/constrained routing, TSP, centrality, simplification, snapping) moved unchanged to the dependency-free crate osmnxr-core (https://strategicprojects.github.io/osmnxr-core/), which the package pins exactly and bundles in
src/rust/vendor.tar.xz;src/rust/src/lib.rskeeps only the extendr wrappers. Results do not change. Building from source needs Rust 1.81 or later.The Overpass network filters now mirror OSMnx 2.1’s tag for tag, replacing the simplified highway-only regexes used so far. Downloads gain the negative filters (
area=yes,access=private,motor_vehicle=no,foot=no,bicycle=no, service-road subtypes, ways taggedrest_area/services, and walk ways whose sidewalk is mapped as a separate way), and two network types joindrive/walk/bike/all:drive_service(drivable including service roads) andall_public. Note two behaviour changes:"drive"no longer includes service roads (use"drive_service"), and"all"now means every in-use way including private access rather than literally every highway value.ox_simplify()now preserves every edge attribute column (a merged edge takes its first segment’s value) instead of keeping onlyhighwayandname, and gainededge_attr_aggs(as in OSMnx 2): a named list of functions combining per-segment values along each merged chain, e.g.list(travel_time = sum, speed_kph = mean). By defaulttravel_timeandpenaltyare summed when present, so pre-computed routing weights survive simplification instead of being dropped.ox_consolidate_intersections()accepts a per-nodetolerance(one merge radius per node, as in OSMnx 2: nodes merge when buffers oftolerance/2overlap), validates the tolerance, and now warns when asked to consolidate an already-consolidated graph — it proceeds, since re-clustering with a larger tolerance is well-defined here, but the double run is made visible.New
ox_validate()checks that a graph meets the package’s structural expectations —sftypes, complete and unique node ids, resolvableu/v, a usablelength, one CRS, and edge geometries that actually run from theirunode to theirvnode — reporting every problem found in one pass (OSMnx gained validation helpers in 2.1.0). Handy after building a layer by hand forox_blend()/ox_union().
osmnxr 0.1.5
New
ox_blend()blends point locations — or a whole second graph — into a street network (#6, requested by @talegari), theosmnxrcounterpart ofsfnetworks::st_network_blend(): each point is snapped onto its nearest edge (grid-indexed planar search in the Rust core) and the edge is split there, in both directions of a two-way street, turning the location into a routable node. Attributes are preserved (lengthrecomputed;travel_time/penaltyrescaled proportionally), points beyondtoleranceare skipped with a warning, andmeta$blendmaps every input to its node. Given a secondosm_graph, the three-step recipe from the issue is applied: blend its nodes in, stack the graphs withox_union(), and add connector edges between each snapped pair — one routable multimodal network.ox_blend()gained finer control from @talegari’s field test on the Delhi road + metro networks (#6):meta$blendnow also recordsu/v, the endpoints of the edge each point snapped onto;snap_nodesflags which points (orynodes) may snap (station gates yes, platforms no);snap_edgesflags which edges ofgmay receive them (keep off limited-access flyovers);connector_node_attrscopiesynode attributes — say, a per-station access time — onto the connector edges; and reusing agosmid inyat different coordinates is now an error with a renumbering hint, instead of a silently corrupting first-wins merge.New
ox_route_shortest()rounds out theox_route_*family (#5 feedback, @talegari): thesfinterface to shortest-path routing, returning cost, node path and merged street geometry per route, withk > 1enumerating loopless alternatives (Yen) — one naming scheme and one return shape acrossox_route_shortest(),ox_route_constrained(),ox_route_pareto()andox_route_tsp().ox_shortest_path()andox_k_shortest_paths()remain as the lighter node-sequence variants.Repeated routing calls on the same graph are much faster (#5 feedback, @talegari): the structural edge index that every router marshals for the Rust core (the dominant per-call cost on metro-sized graphs) is now cached for the session, content-addressed by the graph’s node ids and edge endpoints — so copies hit, edits miss, and nothing goes stale. On the NCR Delhi network (2.1M directed edges) a warm
ox_route_constrained()call drops from ~0.7 s to the Rust solve time itself.ox_clear_cache()also clears this cache. The Dijkstra/Yen solvers additionally return the edges they traversed, soox_route_shortest()andox_route_tsp()draw exact geometry across parallel edges (previouslyox_route_tsp()drew the minimum-weight twin).New preference-aware routing (#5, requested by @talegari):
ox_route_constrained()finds the exact minimum-cost route whose consumption of a second edge criterion stays within a budget (e.g. “the shortest route using at most 500 m of residential streets”), andox_route_pareto()enumerates the full Pareto front of cost-vs-preference trade-offs. Both run on a bicriteria label-setting solver (Martins’ algorithm) with dominance pruning and reverse-Dijkstra bounds in the Rust core — exact, deterministic, one-way streets respected. The new helperox_add_edge_penalties()builds the penalty/resource edge column from OSMhighwayclasses; added onto the routing weight it also covers simple scalarized (“soft preference”) routing throughox_shortest_path().ox_route_constrained(method = "lagrangian")adds a Lagrangian-relaxation solver (the LARAC algorithm) beside the exact one: the budget constraint is dualized so each iteration is a plain Dijkstra onweight + lambda * resource, which scales to networks where the exact front grows too large. The route returned is always feasible and carries a provenlower_boundon the optimal cost (cost == lower_boundcertifies optimality; a message reports any duality gap). The exact method now also reportslower_bound, always equal tocost(#5).Route geometry reconstruction is dramatically faster on large graphs. The bicriteria routers now receive the traversed edge indices straight from the Rust solvers, so no parallel-edge lookup is needed at all — and the geometry is exact even across parallel edges that differ in cost or resource (previously the minimum-weight twin was drawn). On the NCR Delhi drive network (1.0M nodes / 2.1M directed edges) an
ox_route_constrained()query runs in ~0.7 s and a 9-routeox_route_pareto()front in ~1.5 s, down from ~16 s and ~140 s. Forox_route_tsp(), the parallel-edge lookup is now built once per call instead of once per leg (and sorts numerically instead of by string key).
osmnxr 0.1.4
- New
ox_route_tsp()solves a travelling-salesman route through a set of stops over the street network, in the spirit ofsfnetworks::st_network_travel(): the asymmetric network-distance matrix (one-way streets respected) is computed in the Rust core, the visiting order is solved there too with an iterated local search (or-opt + swap + 2-opt descent restarted from double-bridge perturbations, deterministic), and each leg is returned as ansfrow with its cost, node path and street geometry. Supports closed tours (end = start, the default), open routes (end = NULL) and a pinned final stop. Benchmarked againstTSP::solve_TSP()(the backend ofsfnetworks::st_network_travel()) on identical cost matrices over the bundled real networks, it matched or beat it in all 80 random instances tried (8–50 stops), by ~1% on average at 8 stops up to ~10% at 50 (#4, requested by @talegari).
osmnxr 0.1.3
ox_graph_from_*()is dramatically faster on large areas: building the graph from the Overpass response was quadratic in the number of edges (it never finished on a metro-sized bbox) and is now vectorised — a response with 600,000 nodes / 1 million directed edges parses in ~15 s (#3, reported by @talegari).Overpass and Nominatim requests now retry on HTTP 500, 502 and 504 (and on connection failures) in addition to httr2’s default 429/503, with exponential backoff. The number of attempts remains configurable via
ox_settings(max_tries = )(#2, reported by @talegari).
osmnxr 0.1.2
CRAN release: 2026-10-19
- New
ox_union()combines two or moreosm_graphobjects into one: node and edge tables are stacked, nodes sharing anosmidare merged and edges duplicated across graphs are dropped (dedupe_edges = FALSEkeeps them). Attribute columns present in one graph but not another are filled withNA. Designed for multimodal networks — union a street graph with a hand-built layer (e.g. metro) whose transfer edges reference street-nodeosmids, then route across both (#1, requested by @talegari).
osmnxr 0.1.1
CRAN release: 2026-07-05
- Fix installation on Windows (R-devel). The rextendr 0.5.0 Makevars templates ran an unnecessary install-time
cargo run --bin documentstep that failed on Windows (os error 193while running a build script). The extendr wrappers are pre-generated and shipped, so installation only needscargo build --lib; the document step has been removed fromMakevars.in/Makevars.win.in.
osmnxr 0.1.0
First public release of OSMnx for R.
ox_example()loads a small bundled real network (central Olinda, Brazil) so examples and vignettes show real analyses offline. The vignettes were reworked around real cases from Boeing (2025) and the OSMnx examples gallery: multi-city orientation entropy (Chicago/New Orleans/Rome), betweenness chokepoints, travel-time routing and isochrones, and amenity accessibility.ox_orientation_entropy()andox_plot_orientation()now accept either anosm_graphor a numeric vector of bearings.ox_plot_figure_ground()draws figure-ground diagrams, andox_example()now also bundles"manhattan"and"rome"networks for the new “Figure-ground diagrams” vignette (Boeing 2025, Fig. 3).ox_simplify()now preserves traversability per direction, emitting bidirectional edges for two-way streets (fixes zero-valued routing/centrality on simplified graphs).Download street networks from OpenStreetMap (
ox_graph_from_place(),ox_graph_from_address(),ox_graph_from_point(),ox_graph_from_bbox()) via the Overpass API, returning the tidysf-backedosm_graphobject.Geocoding with Nominatim (
ox_geocode(),ox_geocode_to_sf()).Rust compute core (via extendr): CSR graph, Dijkstra routing (
ox_shortest_path(),ox_distances(),ox_nearest_nodes()) and metrics (ox_basic_stats(),ox_bearings(),ox_orientation_entropy()).example_osm_graph()synthetic grid for offline examples and tests.Configuration via
ox_settings()and session caching withox_clear_cache().Topology cleanup (Rust core):
ox_simplify()merges chains of interstitial degree-2 nodes into single edges;ox_consolidate_intersections()merges nearby nodes into one (via connected components);ox_nearest_edges()finds the closest edge to a point.Advanced routing (Rust core):
ox_k_shortest_paths()(Yen’s algorithm),ox_distance_matrix()(many-to-many), andox_isochrone()(reachable-area polygons via multi-source Dijkstra + concave hull).Travel-time routing:
ox_add_edge_speeds()andox_add_edge_travel_times()addspeed_kph/travel_timeedge columns for time-weighted shortest paths and isochrones.New vignette: “Routing and isochrones”.
Network metrics (Rust core):
ox_centrality()(betweenness via Brandes’ algorithm, closeness) andox_circuity()(street straightness). Circuity is now also reported byox_basic_stats().Interoperability:
ox_as_sfnetwork(),ox_as_tidygraph()andox_as_dodgr()hand the graph to the wider R network ecosystem.Export and persistence:
ox_to_geojson(),ox_to_maplibre()(style fragment), andox_save_graphml()/ox_load_graphml()for a lossless round-trip (edge geometry stored as WKT), compatible with OSMnx / NetworkX / Gephi.Feature downloads:
ox_features_from_place()andox_features_from_bbox()fetch POIs, buildings and amenities from OpenStreetMap as tidysfpoints.ox_plot_orientation()draws a polar rose plot of street bearings (ggplot2).Documentation: vignettes “Urban metrics”, “Street orientation”, “Features and points of interest”, “Interoperability and export” and “Accessibility analysis”; full pkgdown reference and articles menu.