Although lat and lon are represented by doubles, this is usually slightly wasteful. This function allows you to represent coordinates as single integer, vastly reducing memory footprint.
compress_latlon(lat, lon, nThread = getOption("healthyAddress.nThread", 1L))decompress_latlon(x, nThread = getOption("healthyAddress.nThread", 1L))
compress_latlon_general(
lat,
lon,
nThread = getOption("healthyAddress.nThread", 1L)
)
decompress_latlon_general(x, nThread = getOption("healthyAddress.nThread", 1L))
The _general
version of the compression/decompression use the observed
range of the latitude and longitude to form a \(2^16\) grid, while the
bare versions use the known limits of Australian address coordinates
(including the overseas territories). Since, in the latter, the grid
will be much less fine, you should expect greater loss of information,
possibly exceeding 100 metres.
compress_latlon
An integer vector.
decompress_latlon
The original lat,lon
, with some information loss
compress_latlon_general
An integer vector, with attributes minmaxLat
and minmaxLon
.
decompress_latlon_general
The original lat,lon
, with some information loss.
Coordinates to compress.
Number of threads to use.
An integer vector formed by one of the compression functions.