Description Usage Arguments See Also Examples
One of the things that makes OLCs useful is that they can shortened - you can trim
characters off them, saving space without substantially compromising the accuracy. shorten_olc
takes full-length OLCs (generated with encode_olc
or any other way) and shortens them.
1 | shorten_olc(olcs, lats, longs)
|
olcs |
a vector of open location codes, generated with |
lats |
a numeric vector of latitudes. |
longs |
a numeric vector of longitudes, equivalent in size to |
encode_olc
to create full Open Location Codes.
1 2 3 4 5 6 7 8 | #Encode an OLC and then shorten it
olc <- encode_olc(51.3708675,-1.217765625, 12)
validate_full(olc)
# [1] TRUE
olc <- shorten_olc(olc, 51.3708675,-1.217765625)
validate_short(olc)
# [1] TRUE
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.