ox_geocode_to_sf: Geocode a place to an 'sf' boundary

View source: R/geocode.R

ox_geocode_to_sfR Documentation

Geocode a place to an sf boundary

Description

Like ox_geocode() but returns the place geometry (boundary polygon when available, otherwise a point) as an sf object.

Usage

ox_geocode_to_sf(query, limit = 1)

Arguments

query

A character scalar, e.g. "Recife, Brazil".

limit

Maximum number of results. Default 1.

Value

An sf object (one row per result) in EPSG:4326.

Examples


ox_geocode_to_sf("Recife, Brazil")


osmnxr documentation built on Oct. 20, 2026, 1:07 a.m.