AnsweredAssumed Answered

Zonal statistics for raster using a matching mask file

Question asked by harrismr on Jan 27, 2015
Latest reply on Jan 30, 2015 by harrismr

Hi again GeoNet community!

 

I have a question and the answer may involve script. Just a warning, I have very rarely dealt with scripting and so if the answer is a script code then I may need some extra guidance. Anyway, my problem is this:

 

I have about 1300 raster layers that I need to iterate through. For each raster layer, I need to run zonal statistics using a polygon layer. Each polygon layer corresponds to each raster in space and they also have the same file name (i.e. the raster name is 110_10R and the polygon file name is 110_10R as well, they are just saved in different folders. How can I make it so that 110_10R (raster) uses 110_10R (polygon) for its zonal statistics? Remember this needs to iterate 1300 times (actually 1300 x 12) so it needs to be 110_10R (raster) with 110_10R (polygon) then it moves on a runs 111_10R (raster) with 111_10R (polygon)...etc...

 

Remember, scripting novice, but I realize that it may be the only way to solve this issue

 

Thanks!

Outcomes