Skip to contents

Geocodes query with ox_geocode() and downloads the street network within the bounding box of the matched place.

Usage

ox_graph_from_place(query, network_type = "drive")

Arguments

query

A place name, e.g. "Recife, Brazil".

network_type

One of "drive" (public drivable streets, service roads excluded), "drive_service" (drivable including service roads), "walk" (walkable public ways, excluding ways whose sidewalk is mapped as a separate way), "bike" (bikeable public ways), "all" (every way currently in use, private-access included) or "all_public". The Overpass filters mirror OSMnx 2.1's, tag for tag.

Value

An osm_graph.

References

osmnxr is an R port of OSMnx. If you use it, please cite:

Boeing, G. (2025). Modeling and analyzing urban networks and amenities with OSMnx. Geographical Analysis, 57(4), 567–577. doi:10.1111/gean.70009

Examples

if (FALSE) { # interactive()
g <- ox_graph_from_place("Olinda, Brazil", network_type = "drive")
}