Question

Set RasterCellValue from attribute?

  • 3 February 2023
  • 2 replies
  • 4 views

Badge +14
  • Contributor
  • 120 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

Badge +14

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

Badge +14

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.

Reply