Skip to main content
Solved

Clip Multiple Rasters by multiple Shapefiles


Hello everyone,

 

I have a little problem. I have multiple and partially overlapping geotiffs and I have to clip some parts from every raster using multiple Polygon-Features. They are "connected" by one attribute, e.g. the raster is called xyz.tif and the clipper-polygons have this name as an attribute. The Polygon-Shapefile has a lot of different features. How can i group them, so that every raster is only clipped by the belonging Polygon-Features???

I thought, it would be the "Group-By" argument in Clipper Transformer, but it's not working this way. Because of the overlapping I can't ignore the Pairing Raster <-> Polygons.

Any idea please?

 

 

 

Best answer by redgeographics

The group by should work but you have to make an attribute on both the raster and the polygons that has the same name. Easiest way to do it is to create an attribute on the raster that has the same name as on the polygons and fill it with the fme_basename attribute value, then group on that in the Clipper.

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

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+50
  • Celebrity
  • Best Answer
  • June 26, 2019

The group by should work but you have to make an attribute on both the raster and the polygons that has the same name. Easiest way to do it is to create an attribute on the raster that has the same name as on the polygons and fill it with the fme_basename attribute value, then group on that in the Clipper.


fme-phile
Forum|alt.badge.img+1
  • June 29, 2019

Try the 'MultiClipper' custom transformer. This transformer is located on the hub and clips data or imagery with attributes to the required area of interest where the clipping areas overlap. When you add the writer, you can even fanout the output by 'fme_basename'. This will put the output clipped images into separate folders.

 

Note: You can add more that one image into the 'ClippeeInput' port.

You could even use two 'Multiclipper' transformers to run them separately.


  • Author
  • July 1, 2019
redgeographics wrote:

The group by should work but you have to make an attribute on both the raster and the polygons that has the same name. Easiest way to do it is to create an attribute on the raster that has the same name as on the polygons and fill it with the fme_basename attribute value, then group on that in the Clipper.

It has to be the same attribute name! Then "Group By" works fine.


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