Raster Classification Lab
Read numeric bands of a georeferenced raster and assign classes by user-defined value intervals or a nearest-centroid model trained from labeled pixels. Validation pixels are excluded from training, standardization and centroids, then scored in a separate confusion matrix. Uncertainty is only a margin between distances to the two closest centroids—not a calibrated probability or map truth.
Key features
- Reuse G267 single-image, north-up PixelIsArea EPSG:4326/3857 GeoTIFF validation for up to four numeric bands
- Nonoverlapping [minimum, maximum) intervals on a selected band with explicit gaps
- Train-only standardization and class centroids over chosen bands, then nearest-centroid classification
- Reject duplicate/out-of-range/NoData/insufficient samples and report disjoint holdout confusion, per-class recall and support
- Propagate selected-band NoData and unmatched threshold cells as output code 0, counted separately
- Download one-band 8-bit georeferenced GeoTIFF, transparent-NoData PNG and analysis CSV
How to use
- Open a local GeoTIFF or the three-band example. Check its CRS, bands, NoData and extent.
- For threshold mode, enter one band index and JSON with class code, name, color and min/max. Null means an open end; min is included and max excluded.
- For supervised mode, choose comma-separated band indexes and separate training/validation arrays of uniquely labeled zero-based pixel (x,y) coordinates.
- Classify and inspect the legend, NoData, low-distance margins, holdout confusion and per-class support.
- Save the georeferenced class-code GeoTIFF, color PNG or class/holdout CSV locally.
Use cases
- Split a numeric elevation or index band into chosen intervals
- Draft classes of a small satellite raster from labeled pixels
- Inspect class-specific errors on disjoint holdout samples
- Create a legend-colored PNG that preserves NoData locations
Frequently asked questions
Can validation samples leak into training?
No. Any duplicate coordinate within or across training and validation is rejected. Band means, standard deviations and class centroids use training only. Validation pixels evaluate the fixed model and are never used for fitting.
Is a low margin a probability?
No. It is the difference between the standardized Euclidean distances to the second and first nearest centroids. Cells below 0.5 are darkened. This is neither calibrated probability nor a statistical confidence interval.
How are NoData and unmatched values handled?
Any missing/nonfinite selected band yields class code 0. A valid value in a threshold gap also gets code 0 but is counted separately as unclassified. A valid numeric zero remains valid unless the source explicitly tags it as NoData.
Which GeoTIFF and georeferencing are preserved?
One north-up PixelIsArea EPSG:4326 or 3857 image is accepted. Output is an uncompressed one-band 8-bit GeoTIFF with the same dimensions, bounds, pixel scale and EPSG tag. Original multibands, compression and unrelated TIFF/GDAL metadata are not copied.
Does 100% holdout accuracy prove map accuracy?
No. Users select a small set of pixels, and spatial autocorrelation or labeling errors may remain. This score describes only those supplied holdout pixels, not independent ground truth or a calibrated probability.
Are files uploaded?
No. TIFF and pixel labels stay in memory in this browser tab. Downloads are generated only on request; there are no uploads or external map tiles.
Privacy
GeoTIFF files and labeled pixels are processed in this browser tab. There are no uploads, external map tiles or automatic storage.
Comments & questions