The lookup API allows to query the address and other details of one or multiple OSM objects like node, way or relation. This function returns the tibble associated with the query, see geo_address_lookup_sf() for retrieving the data as a spatial object (sf format).
geo_address_lookup( osm_ids, type = c("N","W","R"), lat ="lat", long ="lon", full_results =FALSE, return_addresses =TRUE, verbose =FALSE, nominatim_server ="https://nominatim.openstreetmap.org/", custom_query = list())
Arguments
osm_ids: Vector of OSM identifiers as numeric
(c(00000, 11111, 22222)).
type: Vector character 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 in the output data (default "lat").
long: Longitude column name in the output data (default "long").
full_results: Returns all available data from the API service. If FALSE (default) only latitude, longitude and address columns are returned. See also return_addresses.
return_addresses: Return input addresses with results if TRUE.
verbose: If TRUE then detailed logs are output to the console.
nominatim_server: The URL of the Nominatim server to use. Defaults to "https://nominatim.openstreetmap.org/".
custom_query: A named list with API-specific parameters to be used (i.e. list(countrycodes = "US")). See Details .