python-rasterstats icon indicating copy to clipboard operation
python-rasterstats copied to clipboard

add gdf_zonal_stat to main.py

Open TomKenda opened this issue 2 years ago • 3 comments

Hello, I am not sure it's the best way to do this but I would like to propose a function to get the result of the zonal stat directly as a Geodataframe to keep all the properties and the geometry together with the initial vectors CRS. I you think there's a more efficient way to do this I would be happy to ear it.

TomKenda avatar Sep 15 '23 11:09 TomKenda

Good idea for a user experience improvement. I'd like to see a test but we can add that later.

Are you talking about unit test or just an example ?

TomKenda avatar Oct 05 '23 13:10 TomKenda

A unit test would be ideal. Geopandas is included in the CI test runner so it should work.

perrygeo avatar Oct 05 '23 13:10 perrygeo

I am not sure I did it the right way but I added a unit test and updated the function to fit to a file path input

TomKenda avatar Nov 21 '23 13:11 TomKenda