encode_olc: Encode Latitude and Longitude Pairs as Open Location Codes

Description Usage Arguments See Also Examples

View source: R/RcppExports.R

Description

encode_olc creates Open Location Codes from latitude and longitude values, of a specified length.

Usage

1
encode_olc(lats, longs, length)

Arguments

lats

a numeric vector of latitudes.

longs

a numeric vector of longitudes, equivalent in size to lats

length

the length you want the resulting OLCs to be. The conventional lengths are 10 or 11, with any number above 8 and any even number below it being acceptable. length should consist of either a single value, if you want all codes to be calculated to the same length, or a vector of values the same size as lats and longs if you want to pre-set values.

See Also

decode_olc for the opposite operation, and shorten_olc to convert "full" Open Location Codes to "short" Open Location Codes.

Examples

1
encode_olc(20.375, 2.775,6)

olctools documentation built on May 2, 2019, 4:21 a.m.