Skip to main content
Question

Raster Band Value Average

  • November 6, 2017
  • 5 replies
  • 72 views

Forum|alt.badge.img+1

Hi,

I have what I think is a fairly simple question. I just want to calculate the average of all the cells in one band on a raster. I am using FME2017.0.

Is there a simple way to do this without having to convert the rasters to vectors (points) and then using StatisticsCalculator

Thanks

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3704 replies
  • November 6, 2017

I'm not sure whether it's actually producing a proper average value but...

If you resample (RasterResampler) it to 1x1 pixel you'll get something that, at least in the trials I've done, appears to be pretty correct. It's also very fast (which I think running statistics on a lot of pixels is not)


takashi
Celebrity
  • 7843 replies
  • November 6, 2017

Another thought. You can use the PointCloudCombiner to transform it into a point cloud, and then calculate Mean of required component values with the PointCloudStatisticsCalculator.


Forum|alt.badge.img+1
  • Author
  • 271 replies
  • November 6, 2017

Great thanks guys, I will try those methods out :)


Forum|alt.badge.img+1
  • Author
  • 271 replies
  • November 6, 2017

Another thought. You can use the PointCloudCombiner to transform it into a point cloud, and then calculate Mean of required component values with the PointCloudStatisticsCalculator.

Thanks @takashi this method worked perfectly.

Forum|alt.badge.img+1
  • Author
  • 271 replies
  • November 6, 2017

I'm not sure whether it's actually producing a proper average value but...

If you resample (RasterResampler) it to 1x1 pixel you'll get something that, at least in the trials I've done, appears to be pretty correct. It's also very fast (which I think running statistics on a lot of pixels is not)

Thanks @redgeographics

 

This method worked for some of my rasters (but the mean was a centimeter or so different to what was calculated using other methods), but not for all my rasters (some of them resulted in a single cell of No Data).