This function search amenities as defined by OpenStreetMap on a restricted area defined by a bounding box in the form (<xmin>, <ymin>, <xmax>, <ymax>). This function returns the tibble associated with the query, see geo_amenity_sf()
for retrieving the data as a spatial object (sf format).
bbox: The bounding box (viewbox) used to limit the search. It could be:
A numeric vector of longitude (x) and latitude (y) (xmin, ymin, xmax, ymax). See Details .
A sf or sfc object.
amenity: A character (or a vector of characters) with the amenities to be geolocated (i.e. c("pub", "restaurant")). See osm_amenities .
lat: Latitude column name in the output data (default "lat").
long: Longitude column name in the output data (default "long").
limit: Maximum number of results to return per input address. Note that each query returns a maximum of 50 results.
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/".
progressbar: Logical. If TRUE displays a progress bar to indicate the progress of the function.
custom_query: A named list with API-specific parameters to be used (i.e. list(countrycodes = "US")). See Details .
strict: Logical TRUE/FALSE. Force the results to be included inside the bbox. Note that Nominatim default behavior may return results located outside the provided bounding box.
Returns
A tibble with the results found by the query.
Details
Bounding boxes can be located using different online tools, as Bounding Box Tool.