Skip to main content
Solved

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

  • February 20, 2022
  • 5 replies
  • 38 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 

View original
Did this help you find an answer to your question?

5 replies

nielsgerrits
VIP
Forum|alt.badge.img+55
  • 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
  • February 21, 2022

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


amdubois
  • Author
  • 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+55
amdubois wrote:

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
  • February 22, 2022

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings