Skip to main content

@loaders.gl/raster

GeoTIFF, numeric TIFF, OME-TIFF, LERC, image-encoded terrain, and quantized mesh.

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

The root exports metadata loaders. Asynchronous load() and parse() load their implementations through preload(). Synchronous parsing requires a parser-bearing format entry point:

import {parse, parseSync} from '@loaders.gl/core';
import {GeoTIFFRasterLoader, QuantizedMeshLoader} from '@loaders.gl/raster';
import {QuantizedMeshLoaderWithParser} from '@loaders.gl/raster/quantized-mesh';

const raster = await parse(tiffBytes, GeoTIFFRasterLoader);
const terrain = parseSync(terrainBytes, QuantizedMeshLoaderWithParser);

Format entry points​

LogoEntry pointImplementation
@loaders.gl/raster/geotiffGeoTIFF image and numeric raster parsers
—@loaders.gl/raster/lercLERC parser
—@loaders.gl/raster/terrainImage-encoded elevation to terrain mesh
—@loaders.gl/raster/quantized-meshQuantized mesh parser
—@loaders.gl/raster/terrain/heightmapHeightmap decoding, sampling, and surface helpers
@loaders.gl/raster/geotiffSynchronous GeoTIFF/COG source constructor
@loaders.gl/raster/geotiffSynchronous OME-TIFF source constructor

GeoTIFF and OME-TIFF source metadata is available from the root. Use asynchronous createDataSource() with metadata or import an explicit source implementation for synchronous createDataSourceSync(). Use the named source, discovery, and heightmap subpaths for advanced APIs; their references list the exported constructors and helpers.

Optional decoder packages​

Install geotiff for the GeoTIFF image parser, GeoTIFF/COG source, and OME-TIFF source:

npm install geotiff

The native numeric GeoTIFFRasterLoader defaults to its built-in decoder. Install geotiff when explicitly selecting the geotiff backend or when automatic decoding falls back to it. Use geotiff: {decoder: 'native'} to require native decoding without a compatibility fallback.

Install lerc for LERCLoader:

npm install lerc

Both engines are optional peer dependencies. Terrain and quantized mesh do not require them. LERC's WASM is shipped at @loaders.gl/raster/lerc/lerc-wasm.wasm. Terrain workers are shipped at @loaders.gl/raster/terrain-worker.js and @loaders.gl/raster/quantized-mesh-worker.js.

The standalone GeoTIFF, LERC, and terrain packages have been removed. Loader IDs, format option names, default output shapes, and writer behavior are preserved; loader module is now raster.

Sources and credits​

See the package source and license inventory and the project-wide Attributions and Credits.

Format guides​

Package exports​

All exported subpaths (44)

These are the package's public exports, including format entry points, parsers, writers, sources, and worker assets.

FormatImport subpath
@loaders.gl/raster/geotiff
@loaders.gl/raster/geotiff/bundled
@loaders.gl/raster/geotiff/discover-geotiff
@loaders.gl/raster/geotiff/lib/load-geotiff
@loaders.gl/raster/geotiff/lib/ome/load-ome-tiff
@loaders.gl/raster/geotiff/lib/ome/ome-indexers
@loaders.gl/raster/geotiff/lib/ome/ome-utils
@loaders.gl/raster/geotiff/lib/ome/omexml
@loaders.gl/raster/geotiff/lib/ome/utils
@loaders.gl/raster/geotiff/lib/tiff-pixel-source
@loaders.gl/raster/geotiff/lib/tiff/decode-tiff-samples
@loaders.gl/raster/geotiff/lib/tiff/geotiff-decoder-adapter
@loaders.gl/raster/geotiff/lib/tiff/geotiff-source-adapter
@loaders.gl/raster/geotiff/lib/tiff/plan-tiff-blocks
@loaders.gl/raster/geotiff/lib/tiff/read-tiff-directory
@loaders.gl/raster/geotiff/lib/tiff/tiff-gdal-metadata
@loaders.gl/raster/geotiff/lib/tiff/tiff-metadata
@loaders.gl/raster/geotiff/lib/tiff/tiff-numeric-decoder
@loaders.gl/raster/geotiff/lib/tiff/tiff-source-decoder
@loaders.gl/raster/geotiff/lib/tiff/tiff-types
@loaders.gl/raster/geotiff/lib/utils/tiff-utils
@loaders.gl/raster/geotiff/loaders
@loaders.gl/raster/geotiff/types
@loaders.gl/raster/lerc
@loaders.gl/raster/lerc-wasm-url
@loaders.gl/raster/lerc/bundled
@loaders.gl/raster/lerc/lerc-wasm.wasm
@loaders.gl/raster/lerc/lib/parsers/lerc/lerc-types
@loaders.gl/raster/quantized-mesh
@loaders.gl/raster/quantized-mesh-worker.js
@loaders.gl/raster/quantized-mesh/bundled
@loaders.gl/raster/terrain
@loaders.gl/raster/terrain-worker.js
@loaders.gl/raster/terrain/bundled
@loaders.gl/raster/terrain/heightmap
@loaders.gl/raster/terrain/lib/decode-quantized-mesh
@loaders.gl/raster/terrain/lib/decode-terrain-heightmap
@loaders.gl/raster/terrain/lib/delatin
@loaders.gl/raster/terrain/lib/helpers/skirt
@loaders.gl/raster/terrain/lib/parse-quantized-mesh
@loaders.gl/raster/terrain/lib/parse-terrain
@loaders.gl/raster/terrain/lib/terrain-contracts
@loaders.gl/raster/terrain/lib/terrain-heightmap-types
@loaders.gl/raster/terrain/lib/utils/version