Solved

Clip Multiple Rasters by multiple Shapefiles

  • 26 June 2019
  • 3 replies
  • 25 views

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?

 

 

 

icon

Best answer by redgeographics 26 June 2019, 16:37

View original

3 replies

Userlevel 5
Badge +25

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.

Badge +1

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.

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.

Reply