rle_compress: Compress raster data using run length encoding

View source: R/rle_compress.R

rle_compressR Documentation

Compress raster data using run length encoding

Description

Compress categorical raster data using run length encoding.

Usage

rle_compress(x, outfile, quiet = FALSE)

Arguments

x

File path to the categorical raster to be compressed, or a Raster* object.

outfile

Character (optional). Path to target .rds file that will store RLE results. Directory will be created recursively if it doesn't exist.

quiet

Logical. Should progress messages be suppressed?

Value

A list with five elements:

  • starts: Cell numbers corresponding to run starts

  • lengths: Run lengths

  • values: Run values

  • extent: Raster extent

  • res: Raster resolution

This object is additionally saved in rds format to outfile, if provided.


jscamac/edmaps documentation built on June 11, 2022, 1:26 a.m.