Skip to main content
Question

Splitting out rasters for RasterExpressionEvaluator

  • October 14, 2013
  • 4 replies
  • 82 views

jaslee
Participant
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!(!)
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.

4 replies

fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • October 14, 2013
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

jaslee
Participant
  • Author
  • Participant
  • October 14, 2013
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

jaslee
Participant
  • Author
  • Participant
  • October 14, 2013
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

fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • October 14, 2013

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