Skip to content

Releases

osmnxr 0.1.4

Choose a tag to compare

@milkway milkway released this 26 Oct 14:00

New: ox_route_tsp() — travelling-salesman routes over the street network

Solves a short route through a set of stops, in the spirit of sfnetworks::st_network_travel() (#4, requested by @talegari):

  • The asymmetric network-distance matrix (one Dijkstra per stop, one-way streets respected) and the visiting order are both computed in the bundled Rust core.
  • The solver is a deterministic iterated local search: nearest-neighbour construction, then an or-opt + swap + 2-opt descent — every move evaluated exactly on the asymmetric matrix — restarted from double-bridge perturbations.
  • Supports closed tours (end = start, default), open routes (end = NULL) and a pinned final stop; returns an sf tibble with one row per leg (cost, node path, merged street geometry).

Benchmarked against TSP::solve_TSP() (the backend st_network_travel() uses) on identical cost matrices over the bundled real networks (Olinda, Manhattan, Rome): matched or beat it in all 80 random instances (8–50 stops), by ~1% on average at 8 stops up to ~10% at 50. A 50-stop route solves in under a second in a release build.

Full details in NEWS.md.

osmnxr 0.1.2

Choose a tag to compare

@milkway milkway released this 19 Oct 20:21

New features

  • New ox_union() combines two or more osm_graph objects into one: node and
    edge tables are stacked, nodes sharing an osmid are merged and edges
    duplicated across graphs are dropped (dedupe_edges = FALSE keeps them).
    Attribute columns present in one graph but not another are filled with NA.
    Designed for multimodal networks — union a street graph with a hand-built
    layer (e.g. metro) whose transfer edges reference street-node osmids, then
    route across both (#1, requested by @talegari).

Full changelog: https://strategicprojects.github.io/osmnxr/news/index.html

osmnxr 0.1.1

Choose a tag to compare

@milkway milkway released this 28 Jun 17:55

osmnxr 0.1.1 — first release of OSMnx for R: download, model, analyze and
visualize OpenStreetMap street networks with a tidyverse API over a bundled
Rust compute core.

Highlights

  • Download & model: ox_graph_from_place/address/point/bbox(), geocoding
    (ox_geocode*), feature/POI downloads (ox_features_from_*), and the tidy
    sf-backed osm_graph object.
  • Rust core (extendr): CSR graph, ox_simplify() /
    ox_consolidate_intersections(), routing (ox_shortest_path(),
    ox_k_shortest_paths(), ox_distances(), ox_distance_matrix()),
    ox_isochrone(), and metrics (ox_basic_stats(), ox_centrality(),
    ox_circuity(), ox_bearings(), ox_orientation_entropy()).
  • Travel time: ox_add_edge_speeds() / ox_add_edge_travel_times().
  • Interop & I/O: ox_as_sfnetwork/tidygraph/dodgr(), ox_to_geojson(),
    ox_to_maplibre(), ox_save_graphml() / ox_load_graphml().
  • Visuals: ox_plot_orientation() (rose plots), ox_plot_figure_ground().
  • Real data offline: ox_example("olinda"|"manhattan"|"rome") and 8
    vignettes built around real cases from Boeing (2025) and the OSMnx gallery.

Notes

  • Requires the Rust toolchain at install time; Rust dependencies are vendored.
  • 0.1.1 fixes a Windows R-devel installation failure present in 0.1.0.
  • R CMD check --as-cran: clean; win-builder R-devel: 1 NOTE (new submission).

🤖 Generated with Claude Code