Skip to main content
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?

Best answer by j.sveinson

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 

View original
Did this help you find an answer to your question?

2 replies

caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • May 13, 2021

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


  • Author
  • Best Answer
  • May 20, 2021

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 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings