View source: R/arc_reverse_geo.R
| arc_reverse_geo | R Documentation |
Generates an address from a latitude and longitude. Latitudes must be
in the range \left[-90, 90 \right] and longitudes in the range
\left[-180, 180 \right]. This function returns the
tibble associated with the query.
arc_reverse_geo(
x,
y,
address = "address",
full_results = FALSE,
return_coords = TRUE,
verbose = FALSE,
progressbar = TRUE,
outsr = NULL,
langcode = NULL,
featuretypes = NULL,
locationtype = NULL,
custom_query = list()
)
x |
longitude values in numeric format. Must be in the range
|
y |
latitude values in numeric format. Must be in the range
|
address |
Output address column name (default |
full_results |
Logical; if |
return_coords |
Logical; if |
verbose |
Logical; if |
progressbar |
Logical; if |
outsr |
The spatial reference of the |
langcode |
Sets the language in which reverse-geocoded addresses are returned. |
featuretypes |
This argument limits the possible match types returned.
By default is |
locationtype |
Specifies whether the output geometry of
|
custom_query |
API-specific arguments to be used, passed as a named list. |
See the ArcGIS REST docs for more info and valid values.
A tibble with the corresponding results. The x,y values
returned by the API are named lon,lat. Note that these coordinates
correspond to the geocoded feature, and may be different from the x,y
values provided as inputs.
See the details of the output in ArcGIS REST API Service output.
outsrThe spatial reference can be specified as either a well-known ID (WKID). If not specified, the spatial reference of the output locations is the same as that of the service (WGS84, i.e. WKID = 4326)).
See arc_spatial_references for values and examples.
featuretypesSee vignette("featuretypes", package = "arcgeocoder") for a detailed
explanation of this argument.
This argument may be used for filtering the type of feature to be returned when geocoding. Possible values are:
"StreetInt"
"DistanceMarker"
"StreetAddress"
"StreetName"
"POI"
"Subaddress"
"PointAddress"
"Postal"
"Locality"
It is also possible to use several values as a vector
(featuretypes = c("PointAddress", "StreetAddress")).
tidygeocoder::reverse_geo()
Other functions for geocoding:
arc_geo(),
arc_geo_categories(),
arc_geo_multi()
arc_reverse_geo(x = -73.98586, y = 40.75728)
# Several coordinates
arc_reverse_geo(x = c(-73.98586, -3.188375), y = c(40.75728, 55.95335))
# With options: using some additional arguments
sev <- arc_reverse_geo(
x = c(-73.98586, -3.188375),
y = c(40.75728, 55.95335),
# Restrict to these features
featuretypes = "POI,StreetInt",
# Result on this WKID
outsr = 102100,
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.