Learn R Programming

dawaR (version 0.2.7)

reverse: Base function for interacting with reverse geocoding of sections.

Description

This function reverse geocodes the coordinates provided. When used out of the box, the function wants WGS84 coordinates (lat/long). ETRS89 or UTM zone 32 can be provided as well. When coordinates from outside of Denmark is provided, the function will fail with a code 404.

Usage

reverse(section, x, y, verbose = TRUE, type = NULL, ...)

Value

Returns a list object with information about the provided section

for the location that is input.

Arguments

section

Defines what section of the api should be called. available_sections() exposes all options for this parameter.

x

The X coordinate to geocode. If no srid is provided this should be the lattitude.

y

The Y coordinate to geocode. If no srid is provided this should be the longitude.

verbose

whether or not to provide {cli} output for the user. Enabled by default, but disabled for all functions that wrap this function

type

The coordinate type for the API to parse. By default none is provided and WGS84 is used. The options are ETRS89, UTM32 and WGS84. The functions checks the input against the available types and errs if the type is not allowed.

...

<dynamic-dots> input query parameters.

Examples

Run this code
if (connection_check()) {
  reverse("regioner", x = 12.58515, y = 55.68324)
}

Run the code above in your browser using DataLab