I'm trying to generate Zonal Statistics with a raster and set of polygons.
In my case the polygons represent census tracts in the US and the raster is population density.
The problem is that sometimes the raster and polygon don't overlap, because the raster only includes the lower 48 states, and I'm writing a script to loop over files from all states to do this operation, and those files include some Alaska/Hawaii files.
Is there a function to check if a raster and a polygon overlap?
Right now I'm working on ArcMap and just copying as snippet as I go:
This gives an error, because state number 02 is Alaska. Ideally it would be smart enough to skip this case.