Solved

Color raster by slope angle.


Hi,

I'm trying to color a raster based on slope angle values.

I want to color the raster in intervals of 0-19, 20-25, 26-30, 31-35, 36-40 and 41-60. Low value = Green, High value = Red.

So far I have used the RasterSlopeCalulator to calculate slope angle, and then the RasterExpressionEvaluator to color the points, but I can't seem to color more than one interval at a time.

 Is there away to merge the different colored rasters with the RasterMosaicker, or can I just tweak my IF-expression?

 

OR, does anyone have a better solution for this?

icon

Best answer by j.sveinson 20 May 2021, 08:21

View original

2 replies

Badge +20

Use multiple serialized RasterCellValueReplacer's (6 for your intervals).

After that you can color the pixels via your solution or create a palette attribute and use RasterPaletteAdder to set it on the raster.

Or use RasterCellCoercer to extract the individual pixels of the slope raster to points, use GradedColorizer from the FMEHub (already has a Red to Green color scheme) followed by ImageRasterizer

Hi,

Thank you for your answer.

I got some help from a colleague, and the solution ended up looking like this.

TIF to SlopeTIF to Slope 2 

Reply