Configure the raster display
Survey tile / Example acquisition
Three-channel mapping: b3 / b2 / b1. This example edits configuration; image rendering belongs to the consuming application.
A raster configuration editor with source-band mapping, single or three-channel modes, supplied stretch bounds and explicit missing-data metadata.
Survey tile / Example acquisition
Three-channel mapping: b3 / b2 / b1. This example edits configuration; image rendering belongs to the consuming application.
Three ways in. They share one source, so the pixels match whichever you pick.
npm install @noorddev/vlak-react
// once, next to your app's root
import "@noorddev/vlak-react/css";
import { RasterBandMixer } from "@noorddev/vlak-react";Precompiled React and one stylesheet. No compiler to configure. Per-component imports work too: @noorddev/vlak-react/components/raster-band-mixer.
npx @noorddev/vlak-cli add raster-band-mixer
The StyleX leaf lands in components/vlak/ with its dependencies, for your own compiler to own. See StyleX.
npx shadcn add https://vlak.dev/r/raster-band-mixer.json
The same registry item, installed by shadcn's CLI.
<link rel="stylesheet" href="node_modules/@noorddev/vlak/css/vlak.css" />
No React. Link vlak.css and use the markup and classes below.
import { RasterBandMixer } from "@noorddev/vlak-react";
import type { RasterBandConfiguration } from "@noorddev/vlak-react";
const configuration: RasterBandConfiguration = {
mode: "rgb", stretch: "none",
red: { bandId: "b3", minimum: 0, maximum: 255 },
green: { bandId: "b2", minimum: 0, maximum: 255 },
blue: { bandId: "b1", minimum: 0, maximum: 255 },
single: { bandId: "b1", minimum: 0, maximum: 255 },
};
<RasterBandMixer label="Band mapping" name="raster" defaultValue={configuration} bands={[
{ id: "b1", label: "Band 1", unit: "counts", noDataValue: 0 },
{ id: "b2", label: "Band 2", unit: "counts", noDataValue: null },
{ id: "b3", label: "Band 3", unit: "counts" },
]} />Selects source bands and display ranges. No pixels, statistics or missing-data rules are inferred.
| Prop | Type | Default | Description |
|---|---|---|---|
labelrequired | ReactNode | ||
bandsrequired | readonly RasterSourceBand[] | ||
value | RasterBandConfiguration | ||
defaultValue | RasterBandConfiguration | initial | |
onValueChange | (value: RasterBandConfiguration) => void | Emits configuration only. The host owns rendering and any statistics or range calculation. | |
description | ReactNode | ||
readOnly | boolean |
Also accepts Omit<FieldsetHTMLAttributes<HTMLFieldSetElement>, "defaultValue">.
| Keys | Does |
|---|---|
| Tab | Moves through mode, range treatment and active channel controls. |
| Arrow keys, Home, End | Navigates the focused Vlak selector. Enter or Space commits a choice; Escape closes the menu. |
| Typing | Edits each active channel's numeric range bounds. |
<fieldset class="rs-raster-band-mixer"><legend class="rs-raster-band-mixer-legend">Band mapping</legend><p class="rs-raster-band-mixer-note">The application renders the image from this configuration.</p><div class="rs-raster-band-mixer-fields"><div class="rs-raster-band-mixer-label"><span id="geo-rendering-mode-label">Rendering mode</span><div class="rs-select rs-select-fluid rs-raster-band-mixer-control"><button type="button" class="rs-dropdown" role="combobox" aria-labelledby="geo-rendering-mode-label" aria-expanded="false" aria-haspopup="listbox">Single band</button></div></div><div class="rs-raster-band-mixer-label"><span id="geo-range-treatment-label">Range treatment</span><div class="rs-select rs-select-fluid rs-raster-band-mixer-control"><button type="button" class="rs-dropdown" role="combobox" aria-labelledby="geo-range-treatment-label" aria-expanded="false" aria-haspopup="listbox">No enhancement</button></div></div></div><div class="rs-raster-band-mixer-channel"><p class="rs-raster-band-mixer-title">Single band</p><div class="rs-raster-band-mixer-label"><span id="geo-single-band-source-label">Single band source</span><div class="rs-select rs-select-fluid rs-raster-band-mixer-control"><button type="button" class="rs-dropdown" role="combobox" aria-labelledby="geo-single-band-source-label" aria-expanded="false" aria-haspopup="listbox">Band 1</button></div></div><p class="rs-raster-band-mixer-note">Missing-data value: 0. Unit: counts</p></div></fieldset>