Skip to main content

LERC module

Decode compact raster values with bounded error.

@loaders.gl/raster/lerc exposes LERC decoding for raster and imagery pipelines. It keeps the compressed payload at the edge and returns typed numeric data for the application or a higher-level loader.

The LERC path

Read compressed raster data. Return typed values.

LERC is commonly used inside geospatial imagery workflows. The module provides the codec boundary while image and service loaders handle the surrounding metadata and transport.

Input

LERC-compressed raster payload

Decoder

WASM-backed LERC implementation

Output

Typed raster values and dimensions

Consumers

Image, GeoTIFF, and service pipelines

Detailed guide

Codec details

The reference below covers installation, the loader API, the LERC format, WASM delivery, and integration with raster workflows.

From-v4.0

Installation​

npm install @loaders.gl/core @loaders.gl/raster lerc

Usage​

import {load} from '@loaders.gl/core';
import {LERCLoader} from '@loaders.gl/raster';

const raster = await load('raster.lerc', LERCLoader);

See the loader reference for decoded bands, masks, statistics, and options. LERC output contains numeric raster values; the application chooses how to visualize them.

The lerc decoder is an optional peer dependency. See the raster package for parser entry points and source constructors.