Skip to main content
Question

Set RasterCellValue from attribute?


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

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
  • 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
  • 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.


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