Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

oe_search

Search for a place and return an sf data frame locating it


Description

This (at the moment internal) function provides a simple interface to the nominatim service for finding the geographical location of place names.

Usage

oe_search(
  place,
  base_url = "https://nominatim.openstreetmap.org",
  destfile = tempfile(fileext = ".geojson"),
  ...
)

Arguments

place

Text string containing the name of a place the location of which is to be found, such as "Leeds" or "Milan".

base_url

The URL of the nominatim server to use. The main open server hosted by OpenStreetMap is the default.

destfile

The name of the destination file where the output of the search query, a .geojson file, should be saved.

...

Extra arguments that are passed to sf::st_read.

Value

An sf object corresponding to the input place. The sf object is read by sf::st_read() and it is based on a geojson file returned by Nominatim API.


osmextract

Download and Read OpenStreetMap Data Extracts

v0.2.1
GPL-3
Authors
Andrea Gilardi [aut, cre] (<https://orcid.org/0000-0002-9424-7439>), Robin Lovelace [aut] (<https://orcid.org/0000-0001-5679-6536>), Barry Rowlingson [ctb] (<https://orcid.org/0000-0002-8586-6625>), Salva Fernández [rev] (Salva reviewed the package (v. 0.1) for rOpenSci, see <https://github.com/ropensci/software-review/issues/395>), Nicholas Potter [rev] (Nicholas reviewed the package (v. 0.1) for rOpenSci, see <https://github.com/ropensci/software-review/issues/395>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.