Learn R Programming

nominatimlite (version 0.1.6)

geo_address_lookup: Query the address and other details of one or multiple OSM objects

Description

Geocodes addresses for OSM objects, identified with the OSM Id.

Usage

geo_address_lookup(
  osm_ids,
  type = c("N", "W", "R"),
  lat = "lat",
  long = "lon",
  full_results = FALSE,
  return_addresses = TRUE,
  verbose = FALSE,
  custom_query = list()
)

Arguments

osm_ids

vector of OSM identifiers (c(00000, 11111, 22222)).

type

vector of the type of the OSM type associated to each osm_ids. Possible values are node ("N"), way ("W") or relation ("R"). If a single value is provided it would be recycled.

lat

latitude column name (i.e. "lat").

long

longitude column name (i.e. "long").

full_results

returns all available data from the geocoding service if TRUE. If FALSE (default) then only latitude and longitude columns are returned from the geocoding service.

return_addresses

return input addresses with results if TRUE. Note that most services return the input addresses with full_results = TRUE and setting return_addresses to FALSE does not prevent this.

verbose

if TRUE then detailed logs are output to the console. FALSE is default. Can be set permanently with options(tidygeocoder.verbose = TRUE)

custom_query

API-specific parameters to be used, passed as a named list (i.e. list(countrycodes = "US")). See Details.

Value

A tibble with the results.

Details

See https://nominatim.org/release-docs/develop/api/Lookup/ for additional parameters to be passed to custom_query.

See Also

Other geocoding: geo_amenity(), geo_lite(), reverse_geo_lite()

Other lookup: geo_address_lookup_sf()

Examples

Run this code
# NOT RUN {
ids <- geo_address_lookup(
  osm_ids = c(46240148, 34633854),
  type = c("W"),
)

ids
# }

Run the code above in your browser using DataLab