Title: | Work with the 'what3words' API for Easy Location Referencing |
---|---|
Description: | Use the 'what3words' API <https://developer.what3words.com/public-api> to return three words which uniquely identify every 3m x 3m square on Earth. It is also possible to return coordinates from any valid three words location. Supports multiple languages. |
Authors: | David Smith [aut, cre, cph] |
Maintainer: | David Smith <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.3 |
Built: | 2025-01-25 03:03:38 UTC |
Source: | https://github.com/davidasmith/whatthreewords |
Returns the coordinates for a given what3words address
coords_from_words(words, full_details = FALSE)
coords_from_words(words, full_details = FALSE)
words |
A what3words location |
full_details |
|
If full_details == FALSE
(the default) a matrix of WGS84
coordinates. Otherwise a list of full details for each what3words location.
coords_from_words("hotdog.jumping.frog")
coords_from_words("hotdog.jumping.frog")
Gets the value of the WTW_API_KEY environment variable
get_api_key()
get_api_key()
The value of the WTW_API_KEY
environment variable.
## Not run: get_api_key()
## Not run: get_api_key()
Gets available languages for use in the what3words API
get_available_languages()
get_available_languages()
A dataframe of available languages.
get_available_languages()
get_available_languages()
Get what3words address from coordinates
words_from_coords(lat, lon, language = "en", full_details = FALSE)
words_from_coords(lat, lon, language = "en", full_details = FALSE)
lat |
Latitude |
lon |
Longitude |
language |
Code for the language of the returned words. |
full_details |
Whether to return the full details from the API, or only the what3words address for the coordinates. |
If full_details
is FALSE (the default), returns a character vector
of the what3words for the submitted coordinates. Otherwise returns a list of
the full details returned by the API.
words_from_coords(lat = 51.5095, lon = -0.1266)
words_from_coords(lat = 51.5095, lon = -0.1266)