Title: | Represent Precise Coordinates in Three Words |
---|---|
Description: | A connector to the 'What3Words' (http://what3words.com/) service, which represents each 3m by 3m square on earth with a unique trio of English-language words. |
Authors: | Oliver Keyes |
Maintainer: | Oliver Keyes <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-12-11 07:25:08 UTC |
Source: | CRAN |
from_position
takes latitude/longitude pair (or sequence of them) and
resolves them to a word cluster used by what3words.
from_position(key, positions, ...)
from_position(key, positions, ...)
key |
an API key obtained from what3words. |
positions |
either a vector containing a single latitude/longitude pair, or a list of vectors for vectorised operations. |
... |
further arguments to pass to httr's GET. |
A list containing the words, positions and language of those words.
from_position
for the opposite operation.
## Not run: # Ask for a single set of words from the what3words API (note: this requires an API key. # Don't actually use 'ANAPIKEY'.) results <- from_position(key = "ANAPIKEY", positions = c(6.385336,-36.293769)) ## End(Not run)
## Not run: # Ask for a single set of words from the what3words API (note: this requires an API key. # Don't actually use 'ANAPIKEY'.) results <- from_position(key = "ANAPIKEY", positions = c(6.385336,-36.293769)) ## End(Not run)
from_words
takes a word cluster used by what3words and
converts them back into latitude/longitude pairs.
from_words(key, words, ...)
from_words(key, words, ...)
key |
an API key obtained from what3words. |
words |
either a vector of words, for a single latitude/longitude pair, or a list of vectors for vectorised operations. |
... |
further arguments to pass to httr's GET. |
A list containing the words, positions and language of those words.
from_position
for the opposite operation.
## Not run: # Ask for a single lat/long pair from the what3words API (note: this requires an API key. # Don't actually use 'ANAPIKEY'.) results <- from_words(key = "ANAPIKEY", words = c("turnip","basil","fruit")) ## End(Not run)
## Not run: # Ask for a single lat/long pair from the what3words API (note: this requires an API key. # Don't actually use 'ANAPIKEY'.) results <- from_words(key = "ANAPIKEY", words = c("turnip","basil","fruit")) ## End(Not run)
This package provides a connector to What3Words, a database that represents 3mx3m geographic areas as unique chains of 3 words