Skip to main content

Hi All,

I often encounter difficulties when attempting to select specific raster values using FME. I am currently working with a raster dataset that contains two bands, and I need to isolate the following values:

  • Band 0 (GRAY8) = 3
  • Band 0 (GRAY8) = 4

Could you please advise on the appropriate expression to use within the RasterExpressionEvaluator to achieve this selection?

Thanks :)

Hi ​@galigis ,

I suppose @if function is what you want. For example, if you would like to keep only 3 or 4 and  set a specific value - e.g. 0 to other cells, this expression works for you.

@if(Ai0]==3 || A|0]==4, A40], 0)


Spot on! 🙂 thanks ​@takashi