View source: R/reverse_geo_lite.R
reverse_geo_lite | R Documentation |
Generates an address from a latitude and longitude. Latitudes must be
between \left[-90, 90 \right]
and longitudes between
\left[-180, 180 \right]
. This function returns the
tibble
associated with the query, see
reverse_geo_lite_sf()
for retrieving the data as a spatial object
(sf
format).
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()
)
lat |
Latitude values in numeric format. Must be in the range
|
long |
Longitude values in numeric format. Must be in the range
|
address |
Address column name in the output data (default |
full_results |
Returns all available data from the API service.
If |
return_coords |
Return input coordinates with results if |
verbose |
If |
nominatim_server |
The URL of the Nominatim server to use.
Defaults to |
progressbar |
Logical. If |
custom_query |
API-specific parameters to be used, passed as a named
list (ie. |
See https://nominatim.org/release-docs/develop/api/Reverse/ for additional
parameters to be passed to custom_query
.
A tibble
with the results found by the query.
Use the option custom_query = list(zoom = 3)
to adjust the output. Some
equivalences on terms of zoom:
zoom | address_detail |
3 | country |
5 | state |
8 | county |
10 | city |
14 | suburb |
16 | major streets |
17 | major and minor streets |
18 | building |
reverse_geo_lite_sf()
, tidygeocoder::reverse_geo()
.
Reverse geocoding coordinates:
reverse_geo_lite_sf()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.