Question

Keep Clipper attributes

  • 22 January 2016
  • 4 replies
  • 15 views

Badge +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

Badge

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

Badge +10

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

Badge +6

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

Userlevel 2
Badge +17

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

Reply