Skip to main content

Hello FME-Community,

 

 

I’d like to classify raster data by using breakpoints and I want to adapt the RGB-Codes before the output. Maybe someone of the community here can help me.

 

 

Thank you so much. :)

 

 

Best regards!

Hi @abu_de_bdlq_16 I think this article is a good starting point on how to use the RasterExpressionEvaluator to classify your rasters.

It would help if you could specify more on what you are actually trying to achieve.


You can use conditional values in a RasterExpressionEvaluator, but nesting several layers makes the expression very complicated.

 

 

Depending on your exact scenario, I might recommend using the RasterCellValueReplacer and paletes.

Both ways are possible, thank you so much. :)


Hi @abu_de_bdlq_16, if the requirement is to classify the cells of a grayscale raster into five classes by four threshold values and replace cell values with specific colors associated to each class, this workflow might be helpful.

Notes:

  • Modify the thresholds in the expression according to the actual demand.
  • See the help on the RasterPaletteExtractor transformer to learn about the syntax for palette definitions.

upper: source raster, lower: result


Reply