reverse_geo_lite: Reverse geocoding API

View source: R/reverse_geo_lite.R

reverse_geo_liteR Documentation

Reverse geocoding API

Description

Generates an address from latitude and longitude (latitudes in \left[-90, 90 \right] and longitudes in \left[-180, 180 \right]), and returns the tibble associated with the query. See reverse_geo_lite_sf() for retrieving the data as an sf object.

Usage

reverse_geo_lite(
  lat,
  long,
  address = "address",
  full_results = FALSE,
  return_coords = TRUE,
  verbose = FALSE,
  nominatim_server = "https://nominatim.openstreetmap.org/",
  progressbar = TRUE,
  custom_query = list()
)

Arguments

lat

Latitude values in numeric format. Must be in the range \left[-90, 90 \right].

long

Longitude values in numeric format. Must be in the range \left[-180, 180 \right].

address

Address column name in the output data (default "address").

full_results

Return all available data from the Nominatim API. If FALSE (default), only latitude, longitude and address columns are returned. See also return_addresses.

return_coords

Return input coordinates with results if TRUE.

verbose

If TRUE, detailed logs are output to the console.

nominatim_server

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

Named list with API-specific parameters, for example list(zoom = 3). See Details.

Details

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

Value

A tibble with the results that match the query.

About zooming

Use the option custom_query = list(zoom = 3) to adjust the output. Some zoom levels correspond to these address details:

zoom address_detail
3 country
5 state
8 county
10 city
14 suburb
16 major streets
17 major and minor streets
18 building

See Also

tidygeocoder::reverse_geo().

Reverse geocoding: reverse_geo_lite_sf()

Examples




reverse_geo_lite(lat = 40.75728, long = -73.98586)

# Several coordinates
reverse_geo_lite(lat = c(40.75728, 55.95335), long = c(-73.98586, -3.188375))

# With options: zoom to country level
sev <- reverse_geo_lite(
  lat = c(40.75728, 55.95335), long = c(-73.98586, -3.188375),
  custom_query = list(zoom = 0, extratags = TRUE),
  verbose = TRUE, full_results = TRUE
)

dplyr::glimpse(sev)



nominatimlite documentation built on June 3, 2026, 9:06 a.m.