Skip to main content

Hi I have a raster and polygon dataset. I have used the Clipper transformer to clip the raster, but would also need to keep the attribute ID from the polygon dataset.

I have tried "Merge Attributes" on the clipper, but this makes no difference.

Any suggestions?

Is there already an attribute with the same name as the name of the ID?

 

Did you try the 'Prefix Clipper' for 'Accumulation Mode'?

http://docs.safe.com/fme/2016.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/clipper.htm


It should work fine, though beware of clashing attribute names. I have added a workspace here that demonstrates how to avoid the problem of attribute clashes by adding a clipper prefix name. Give it a go, it's a template so includes the source raster for you to then inspect the attributes on.

Cheers, Dave

RasterClipping.fmwt


It should work fine, though beware of clashing attribute names. I have added a workspace here that demonstrates how to avoid the problem of attribute clashes by adding a clipper prefix name. Give it a go, it's a template so includes the source raster for you to then inspect the attributes on.

Cheers, Dave

RasterClipping.fmwt

Hi, yes thanks this works.

I was actually trying to create points from the raster output using RasterCellCoercer and retain the attributes from the clipper for each point, which doesn't seem to work. (see modified workspace)rasterclipping-1.fmw


Why not set "Yes" to the "Preserve Attributes" parameter of the RasterCellCoercer?


Reply