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

Use GetEnvelope() in Calculate Zonal Statistics

Open Ariki opened this issue 10 years ago • 2 comments

Although the code in zonal_stats() is a good example of reading geometries, I believe using GetEnvelope() is a simpler way to get feature extent.

Ariki avatar Nov 18 '14 10:11 Ariki

You are right. Though the recipe is kind of outdated anyway. Meanwhile Rasterstats showed up and is way better in calculating Zonal Statistics.

ustroetz avatar Nov 18 '14 15:11 ustroetz

Thank you for this suggestion, it seems to be a really powerful solution.

Ariki avatar Nov 18 '14 20:11 Ariki