% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reverse-geo-lite.R
\encoding{UTF-8}
\name{reverse_geo_lite}
\alias{reverse_geo_lite}
\title{Reverse geocode coordinates}
\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{
\item{lat}{A numeric vector of latitude values in the range
\eqn{\left[-90, 90 \right]}.}

\item{long}{A numeric vector of longitude values in the range
\eqn{\left[-180, 180 \right]}.}

\item{address}{A character string specifying the name of the address column
in the output. Defaults to \code{"address"}.}

\item{full_results}{A logical value indicating whether to return all
available fields from the Nominatim API. If \code{FALSE}, only query metadata,
location data and requested address columns are returned.}

\item{return_coords}{A logical value indicating whether to return the input
coordinates with the results.}

\item{verbose}{A logical value indicating whether to display detailed
messages in the console.}

\item{nominatim_server}{A character string specifying the base URL of the
Nominatim server. Defaults to
\code{"https://nominatim.openstreetmap.org/"}.}

\item{progressbar}{A logical value indicating whether to display a progress
bar when processing multiple queries.}

\item{custom_query}{A named list of API-specific parameters, for example
\code{list(zoom = 3)}. See \strong{Details}.}
}
\value{
A \code{\link[dplyr:tibble]{tibble}} with the results that match the query.
}
\description{
Reverse geocodes latitude and longitude coordinates and returns matching
results as a \link[dplyr:tibble]{tibble}. Latitude values must be in
\eqn{\left[-90, 90 \right]} and longitudes in
\eqn{\left[-180, 180 \right]}. Use \code{\link[=reverse_geo_lite_sf]{reverse_geo_lite_sf()}} to return an
\code{\link[sf:st_sf]{sf}} object instead.
}
\details{
See \url{https://nominatim.org/release-docs/latest/api/Reverse/} for additional
parameters to pass to \code{custom_query}.
}
\section{About zooming}{


Set \code{custom_query = list(zoom = 3)} to adjust the output. Selected zoom
levels correspond to these address details:\tabular{ll}{
   \strong{zoom} \tab \strong{address_detail} \cr
   \code{3} \tab country \cr
   \code{5} \tab state \cr
   \code{8} \tab county \cr
   \code{10} \tab city \cr
   \code{14} \tab suburb \cr
   \code{16} \tab major streets \cr
   \code{17} \tab major and minor streets \cr
   \code{18} \tab building \cr
}
}

\examples{
\dontshow{if (nominatim_check_access()) withAutoprint(\{ # examplesIf}
\donttest{
reverse_geo_lite(lat = 40.75728, long = -73.98586)

# Reverse geocode multiple coordinate pairs.
reverse_geo_lite(lat = c(40.75728, 55.95335), long = c(-73.98586, -3.188375))

# Set the zoom to the 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)
}
\dontshow{\}) # examplesIf}
}
\seealso{
\code{\link[=geo_lite]{geo_lite()}} for geocoding addresses.

Reverse geocoding functions:
\code{\link[=reverse_geo_lite_sf]{reverse_geo_lite_sf()}}
}
\concept{reverse}
