Skip to main content
Hi,

 

I have 2 grayscale rasters which I want to combine using the "RasterExpressionEvaluator", BUT they differ slighty in the number of rows and columns which is why my workflow fails.

 

 

I want to run this script several times so I want to dynamically work out the rows and columns of both rasters which we can get these values with the "RasterPropertiesExtractor". I then work out the MIN of both rows and cols using the "ExpressionEvaluator" and resample both rasters to this common dimension using the "RasterResampler".

 

 

Because I need to number of rows and columns of BOTH rasters, the workflow from both raster inputs are COMBINED, but now I want to use the "RasterExpressionEvaluator" in "Two Rasters" mode, how can I separate out the 2 rasters again to that I can assign them into the appropriate "A" and "B" input ports??

 

 

Hope my quetsion is understandable!(!)
Hi,

 

 

I would look into the fme_basename value, that is in case the rasters have different names (which is usually the case).

 

Hope this helps,

 

Itay
Hi,

 

I know I could use the fme_basename to separate them out but how exactly? I hear about "Fanout" but that is only avaiable on the output writer which is an endpoint right?

 

 

I my case, I want to fanout BUT I want to continue the workflow with the "RasterExpressionEvaluator" as mentioned.

 

 

Jason
I think I know now - I can use the TestFilter on the fme_basename to search on a common term - in my case it would be "*slopeshade*" and "*hillshade*". I will give this a try, thanks!

 

 

Jason

Hi Jason,

 

 

Yes that was my initial idea, but actually you can use the group by setting on the raster expression evaluator (set to fme_basename) to calculate per raster (pay attention to the mode setting aswell).

 

Hope this helps,

Itay


Reply