Skip to main content
Question

Set RasterCellValue from attribute?

  • February 3, 2023
  • 2 replies
  • 17 views

aron
Supporter
Forum|alt.badge.img+16
  • Supporter
  • 135 replies

I have a raster that gets cut up to smaller sections in a clipper. Within these sections the cell values need to be identical. I have used a RasterStatisticsCalculator to get a mean value for each section. But how do I write these to the cells? My guess is that there is a step missing in my workspace below where the attribute need to be "written down" to cell level? Unfortunately I can't find a transformer that does this.

 

cellvaluefromattributeI might ad that I have tried a different aproach where I wrote the mean values as a new band, and then removed the old one. This got half the job done, unfortunately, it also overwrites null values. Which means I end up with bounding boxes around everything, and corresponding stray values.

 

2 replies

aron
Supporter
Forum|alt.badge.img+16
  • Author
  • Supporter
  • 135 replies
  • February 3, 2023

Doing some more reading, it looks like RasterExpressionEvaluator might come to my rescue.


aron
Supporter
Forum|alt.badge.img+16
  • Author
  • Supporter
  • 135 replies
  • February 7, 2023

Just to close this. The RasterExpressionEvaluator did the trick. And for anyone who, like me, was once scared away from this transformer by the slightly unintuitive syntax I would like to ad that the documentation has been much improved in recent years with clear examples.