encode_olc: Encode Latitude and Longitude Pairs as Open Location Codes

Description Usage Arguments See Also Examples

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)

Ironholds/olctools documentation built on May 7, 2019, 6:40 a.m.