-
-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding processing option to classify 16bit rasters using scaled value…
…s instead of raw values. (#5834) Added processing option to classify 16bit rasters based on scaled value - includes a basic test.
- Loading branch information
Showing
3 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# | ||
# Simple test of classification methods on a floating point input. | ||
# | ||
MAP | ||
|
||
NAME TEST | ||
STATUS ON | ||
SIZE 400 300 | ||
EXTENT 0.5 0.5 399.5 299.5 | ||
IMAGECOLOR 255 255 0 | ||
|
||
IMAGETYPE png8_t | ||
|
||
OUTPUTFORMAT | ||
NAME png8_t | ||
DRIVER "GD/PNG" | ||
IMAGEMODE PC256 | ||
TRANSPARENT ON | ||
END | ||
|
||
LAYER | ||
NAME grid1 | ||
TYPE raster | ||
STATUS default | ||
DATA data/float.tif | ||
|
||
PROCESSING "SCALE=0,28" | ||
PROCESSING "SCALE_BUCKETS=256" | ||
PROCESSING "CLASSIFY_SCALED=TRUE" | ||
|
||
CLASS | ||
NAME "red" | ||
EXPRESSION ([pixel] < 50) | ||
COLOR 255 0 0 | ||
END | ||
CLASS | ||
NAME "green" | ||
EXPRESSION ([pixel] >=50 and [pixel] < 150) | ||
COLOR 0 255 0 | ||
END | ||
CLASS | ||
NAME "blue" | ||
EXPRESSION ([pixel] > 150) | ||
COLOR 0 0 255 | ||
END | ||
END | ||
|
||
END # of map file |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.