Learn R Programming

hereR (version 0.2.1)

reverse_geocode: HERE Geocoder API: Reverse Geocode

Description

Get addresses or landmarks from locations using the 'Geocoder' API. The return value is an sf object, containing point geometries with suggestions for addresses or landmarks near the provided POIs.

Usage

reverse_geocode(poi, results = 1, landmarks = FALSE,
  url_only = FALSE)

Arguments

poi

sf object, Points of Interest (POIs) of geometry type POINT.

results

numeric, maximum number of results (Valid range: 1 and 20).

landmarks

boolean, retrieve landmarks instead of addresses (default = FALSE)?.

url_only

boolean, only return the generated URLs (default = FALSE)?

Value

An sf object, containing the suggested addresses or landmark names of the reverse geocoded POIs.

References

HERE Geocoder API: Geocode

Examples

Run this code
# NOT RUN {
# Authentication
set_auth(
  app_id = "<YOUR APP ID>",
  app_code = "<YOUR APP CODE>"
)

# Get addresses
addresses <- reverse_geocode(poi = poi, results = 3, landmarks = FALSE, url_only = TRUE)

# Get landmarks
landmarks <- reverse_geocode(poi = poi, results = 3, landmarks = TRUE, url_only = TRUE)
# }

Run the code above in your browser using DataLab