Skip to main content

GPU Raster

Overview

@luma.gl/experimental/gpu-raster provides nodata-aware raster and spatial-field operations that compose through GPUCommandGraph. It makes tile ownership, halos, analytical overviews, residency, capacity, and replayable global statistics explicit.

When to use it

Use GPU Raster for analytical raster pipelines whose intermediate bands, masks, labels, statistics, or contour geometry should remain on the GPU. Image-only presentation effects that do not require analytical values usually belong in a renderer or shader module instead.

Quick start

import {GPUCommandGraph} from '@luma.gl/gpgpu/gpu-core';
import {GPURasterBand, GPURasterStatistics} from '@luma.gl/experimental/gpu-raster';

const graph = new GPUCommandGraph({device, id: 'raster-analysis'});
const band = new GPURasterBand({device, graph, values, validity, width, height});
const statistics = new GPURasterStatistics({device, graph, band});

statistics.addPasses();
const compiledGraph = graph.compile();

Core concepts and data model

  • Raster bands keep values separate from validity so nodata never becomes an accidental value.
  • Tiles own half-open pixel cores; halos provide neighboring samples without duplicating ownership.
  • Source overviews and GPU-generated analytical overviews have different provenance and policies.
  • Global tiled statistics use explicit initialization and replay rather than adding incompatible local histograms.
  • Resident tiles are leased under separate CPU and GPU budgets controlled by the application.

Read GPU Raster concepts for nodata, connectivity, tiling, halos, overviews, replay, and residency in detail.

Try the Satellite Raster Lab

Preparing GPU experienceGPURaster: Satellite Raster LabLoading synthetic satellite bands and the GPU-native raster-analysis graph.

Operations and API index

FamilyOperations
Storage and residencyraster bands, decoded tile sources, tile residency, owned-core extraction
Overviewsfloating mean, weighted pyramids, categorical nearest and mode
Pixel operationspointwise band math, NDVI, contrast, gamma, equalization, thresholds
Statisticsvalid-pixel reductions, histograms, replayable global statistics, quantiles
Filters and morphologystencils, convolution, Gaussian/box smoothing, gradients, dilation, erosion, opening, closing
Regions and contoursconnected components, dense labels, region measurements, marching squares, indirect overlays

The operations reference documents inputs, outputs, execution, capacity, and cost.

Limits and compatibility

  • GPU Raster is experimental and WebGPU-only.
  • Tile sources, decoded arrays, GPU residency, cancellation, and submission remain application-owned.
  • Cross-tile component identity is not currently merged automatically.
  • Capacity-dependent labels, geometry, and statistics report overflow or incomplete work.
  • GPU scheduling provides scheduling and generic aggregation/indexing primitives.
  • GPU Project handles coordinate projection and adaptive patches.
  • GPU Raster concepts explains the execution model independently of individual classes.