Find mean zonal stats using a geoseries or GeoJSON object - Python

258
0
02-05-2022 05:19 AM
munabhaya
New Contributor

I have a TIFF file with imperviousness levels and a Geoseries object containing the boundary coordinates of circles around 9 points. I want to find the mean value using zonal_stats but I don't know how to pass the circle geometry objects.

geometry=[Point(xy) for xy in zip(df['longitude'], df['latitude'])]
geodata=gpd.GeoDataFrame(df,crs=crs, geometry=geometry)
buf_df = gpd.GeoSeries(geometry)
buff_circle= buf_df.buffer(0.001, cap_style = 1)

The buff_circle has the boundary coordinates of the Circles

0 Kudos
0 Replies