py-gdalogr-cookbook icon indicating copy to clipboard operation
py-gdalogr-cookbook copied to clipboard

Calculate zonal statistics example problem!

Open vieiramesquita opened this issue 7 years ago • 2 comments

The Calculate zonal statistics exemple in the page have a little problem. The variable "feat" of the funtion "zonal_stats" is being overwritten by the line feat = lyr.GetNextFeature(). Please, correct this removing this line of the code!

https://pcjericks.github.io/py-gdalogr-cookbook/raster_layers.html#calculate-zonal-statistics

vieiramesquita avatar Jul 21 '17 15:07 vieiramesquita

Thanks @vieiramesquita for finding this. Do you wanna send a small PR to fix this?

ustroetz avatar Jul 21 '17 15:07 ustroetz

Fixed in https://github.com/pcjericks/py-gdalogr-cookbook/pull/170

kannes avatar Sep 23 '19 14:09 kannes