Hi fellow colleagues,
I just have one very basic question about standardizing my raster layer with the following syntax:
(["Layer"] - ["Layer"].minimum) / (["Layer"].maximum - ["Layer"].minimum)
Can someone please explain how this one works?
Thanks for the help!
Solved! Go to Solution.
It rescales the pixel values to 0-1.
Imagine you have a raster with pixel values from 1-10. raster.minimum is 1 raster.maximum is 10.
A pixel with a value of 1 will get rescaled to (1-1) / (10-1) = 0,
2 gets rescaled to (2-1)/(10-1) = 0.111
etc .
10 gets rescaled to (10-1)/(10-1) = 1
It rescales the pixel values to 0-1.
Imagine you have a raster with pixel values from 1-10. raster.minimum is 1 raster.maximum is 10.
A pixel with a value of 1 will get rescaled to (1-1) / (10-1) = 0,
2 gets rescaled to (2-1)/(10-1) = 0.111
etc .
10 gets rescaled to (10-1)/(10-1) = 1