Question

RasterStatisticsCalculator vs Esri/GDAL Zonal Stats


I'm trying to replicate an analysis in FME that we have done both Esri and GDAL Zonal Stats tools. It is pretty basic. I have a single band raster layer of percent tree cover spanning the contiguous US. I need to summarize that data at the tract level. I.e. what is the mean tree cover for each tract within the US. I get identical results when doing the analysis with Zonal Statistics in Esri and GDAL. When I conduct a similar analysis in FME by clipping the raster to the tracts (merging attributes) and then use the RasterStatisticsCalculator on the result, I get a completely different answer. 


5 replies

Userlevel 5
Badge +25

Can you share the results of both FME and ESRI/GDAL for a single tract?

Thanks @Hans van der Maarel​. Here is a table showing 3 tracts comparing the results from the Esri/GDAL methods and a second using FME. imageAlso, here is a screen shot of the process I'm using. I was wondering if I might need to change Preserve Clippee Extents to Yes, but it takes over 3 hours to run just those 3 tracts, so I gave up on that process. I need to process 84,122 tracts, so over 1 hour/tract will not be practical. Thanks for taking a peek.

image

Userlevel 5
Badge +25

Thanks @Hans van der Maarel​. Here is a table showing 3 tracts comparing the results from the Esri/GDAL methods and a second using FME. imageAlso, here is a screen shot of the process I'm using. I was wondering if I might need to change Preserve Clippee Extents to Yes, but it takes over 3 hours to run just those 3 tracts, so I gave up on that process. I need to process 84,122 tracts, so over 1 hour/tract will not be practical. Thanks for taking a peek.

image

You probably don't want to use Preserve Clippee Extents, as that would fill out the entire original raster extents with nodata.

 

However... if that is what's done in the ESRI/GDAL way, it would explain the difference. (can't imagine that being the case though)

You probably don't want to use Preserve Clippee Extents, as that would fill out the entire original raster extents with nodata.

 

However... if that is what's done in the ESRI/GDAL way, it would explain the difference. (can't imagine that being the case though)

I went ahead and let it finish processing with "Preserve Clippee Extents = YES" but that didn't change the results at all. I got the exact same result as when it is set to NO. Therefore, that was definitely not it. I just find it really alarming how different the results are with FME relative to two other methods that get the same answer.

Badge +20

Try removing the NoData value from the raster (RasterBandNodataRemover).

Also, identify the NoData value and set it to 0.

My guess is that FME calculates statistics only on valid pixels and that generates the higher values.

If this doesn't work, please upload a sample raster and provide the value that is expected.

Reply