Skip to main content
Question

Keep Clipper attributes


sunsilk11
Contributor
Forum|alt.badge.img+6

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?

4 replies

Forum|alt.badge.img+7

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


davideagle
Contributor
Forum|alt.badge.img+21
  • Contributor
  • January 22, 2016

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


sunsilk11
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • January 22, 2016
davideagle wrote:

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


takashi
Contributor
Forum|alt.badge.img+21
  • Contributor
  • January 22, 2016

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


Reply


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