Skip to contents

Download networks

Build routable street graphs from OpenStreetMap.

ox_graph_from_place()
Download a street network for a named place
ox_graph_from_address()
Download a street network around an address
ox_graph_from_point()
Download a street network around a point
ox_graph_from_bbox()
Download a street network within a bounding box

Features

Download points of interest, buildings and amenities.

ox_features_from_place()
Download features for a named place
ox_features_from_bbox()
Download features within a bounding box

Geocoding

ox_geocode()
Geocode a place or address
ox_geocode_to_sf()
Geocode a place to an sf boundary

Network processing

Clean and transform graph topology (Rust core).

ox_simplify()
Simplify street-network topology
ox_consolidate_intersections()
Consolidate nearby intersections
ox_add_edge_speeds()
Add edge speeds
ox_add_edge_travel_times()
Add edge travel times

Routing

Shortest paths, distances and service areas (Rust core).

ox_nearest_nodes()
Find the nearest node to a point
ox_nearest_edges()
Find the nearest edge to a point
ox_shortest_path()
Shortest path between two nodes
ox_k_shortest_paths()
k shortest paths between two nodes
ox_distances()
Single-source shortest distances
ox_distance_matrix()
Shortest-path distance matrix
ox_isochrone()
Compute isochrones (service areas)

Metrics

Urban and network statistics (Rust core).

ox_basic_stats()
Basic street-network statistics
ox_centrality()
Node centrality
ox_circuity()
Average network circuity
ox_bearings()
Compute edge compass bearings
ox_orientation_entropy()
Street-orientation entropy
ox_plot_orientation()
Polar plot of street orientations
ox_plot_figure_ground()
Figure-ground diagram of a street network

Interoperability

Hand graphs to the wider R network ecosystem.

ox_as_sfnetwork()
Convert to an sfnetwork
ox_as_tidygraph()
Convert to a tidygraph table graph
ox_as_dodgr()
Convert to a dodgr graph

Export and persistence

ox_to_geojson()
Export to GeoJSON
ox_to_maplibre()
Build a MapLibre GL style fragment
ox_save_graphml()
Save a graph to GraphML
ox_load_graphml()
Load a graph from GraphML

The osm_graph object

new_osm_graph()
Construct an osm_graph
is_osm_graph()
Test whether an object is an osm_graph
ox_as_sf()
Extract sf nodes and edges from an osm_graph
plot(<osm_graph>)
Plot an osm_graph
ox_example()
Load a bundled real-world example network
example_osm_graph()
A small synthetic osm_graph for examples and tests

Configuration

ox_settings()
Get or set package settings
ox_clear_cache()
Clear the session cache