Skip to main content
Solved

Color raster by slope angle.

  • May 13, 2021
  • 2 replies
  • 86 views

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 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

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