Skip to main content
Solved

Read big raster only once THAN clip using multiple extents via workspace runner

  • February 20, 2022
  • 5 replies
  • 65 views

amdubois

Hello,

 

I'm still juggling with FME. I have this very large raster (30 Go) and I need to clip with over 2000 different shapefile extents. Right now, I have been trying to use a Feature Reader and set up a spatial filter to read only what intersects the selected shapefile. Unfortunately, the whole raster is always completely returned.

 

I have also tried creating a parent workspace only reading the main raster and creating a child workspace that would clip the raster according to the selected shapefile. The problem is that the raster is then read EVERYTIME in the child workspace (which amounts to about 72 hrs of unnecessary processing).

 

I have read somewhere that you can publish extent parameter and use it in a normal reader to apply a search by envelop and than clip. However, I can't seem to understand how to "call" the parameters in the reader as there are no way to input parameter (see picture below).

 

 image.pngWould anyone have a solution?

Best answer by nielsgerrits

After you added the Reader, you can create or link user parameters to the reader parameters via the Navigator window:

Create User Parameter 

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.

5 replies

nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • Best Answer
  • February 21, 2022

After you added the Reader, you can create or link user parameters to the reader parameters via the Navigator window:

Create User Parameter 


amdubois
  • Author
  • 25 replies
  • February 21, 2022

This is great! I didn't know you could set up parameters from there. Thank you @nielsgerrits​ 


amdubois
  • Author
  • 25 replies
  • February 22, 2022

I don't know if it's a good idea to add a follow-up question here, but here I go. Although the process explained previously did work, I'm still missing something. I have set up a workspace runner which basically just reads the raster and grabs the extent variable via the boundsExtractor. However, I can't seems to be able to access the actual raster. The inspector I added shows me the raster is indeed good but if I look at the "suceeded" output of the Workspace runner, it is just my shapefile output.

 

WorkspaceRunner limit raster boundworkspaceRunner output 


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • February 22, 2022

I don't know if it's a good idea to add a follow-up question here, but here I go. Although the process explained previously did work, I'm still missing something. I have set up a workspace runner which basically just reads the raster and grabs the extent variable via the boundsExtractor. However, I can't seems to be able to access the actual raster. The inspector I added shows me the raster is indeed good but if I look at the "suceeded" output of the Workspace runner, it is just my shapefile output.

 

WorkspaceRunner limit raster boundworkspaceRunner output 

The inspector is only for visualization .

You either need to process the raster in de the child workspace or write the clipped raster by the child workspace and read it with the parent workspace.

The second option feels more like a FeatureReader with the clip to envelope option but will be slower due to the extra I/O writing the result and reading it back, but it performs nice in my test.


amdubois
  • Author
  • 25 replies
  • February 22, 2022

Perfect! Thank you so much for taking the time to image/exemplify this!