Skip to contents

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

if (FALSE) { # interactive()
ox_geocode_to_sf("Recife, Brazil")
}