I'm trying to perform zonal statistics, and get a message that:

A polygon zone fell outside the bounds of the raster.

It is not possible because the polygon is just a 50-km buffer zone around the city, and the input raster is global.

Here is the part of the code:

 temp_table = (self.temp_dir + os.sep + 'zone_{0}.dbf'
 sa.ZonalStatisticsAsTable(out_layer, 'name', global_ras,
                                          temp_table, 'DATA', 'MEAN')
  • 1
    I think there in lies your problem you mention your buffer is in KILOMETRES and your are processing a GLOBAL dataset, so which units are they in ...not kilometres I suspect...
    – Hornbydd
    Oct 7, 2019 at 20:36

1 Answer 1


In ArcMap or ArcGIS Pro, you have built-in on the fly map projection lets you line up all your data in the same projection as the dataframe. Not all Arcpy tools work in the same way, and you may have data in two different coordinate systems. I think rasters are usually susceptible to this.

You can use the Project raster tool to create a new raster in the same projection. I would use the projected coordinate system over the geographic coordinate system if that is the case.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.