Skip to main content
Question

Raster Band Value Average


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

5 replies

redgeographics
Celebrity
Forum|alt.badge.img+49

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
Influencer
  • 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
  • November 6, 2017

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


Forum|alt.badge.img+1
  • Author
  • November 6, 2017
takashi wrote:

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
  • November 6, 2017
redgeographics wrote:

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

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