Skip to main content
Solved

Clip Multiple Rasters by multiple Shapefiles

  • June 26, 2019
  • 3 replies
  • 202 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?

 

 

 

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.

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.

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3701 replies
  • 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
  • 18 replies
  • 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
  • 1 reply
  • July 1, 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.

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