Python - Rasterio and Geopandas to calculate Zonal Statistics
Satellite data is dense and uses cells to store values. In many cases, however, you want only a summary of the satellite (raster) image converted into a tabular format - CSV or Pandas data frame.
Let us say, for example; you have a Digital Elevation Model (DEM). The DEM image gives a clear representation of the elevation and topography of the area. Now, what if you want to get elevation values and integrate tabular data you have, for example, buildings, to get the elevation of each building.
This process of deriving table outputs (Summary statistics) from raster images is called Zonal Statistics. In this tutorial, We learn how to extract values from raster data and store these values in Tabular format ( Pandas Dataframe). The dataset and the code for this tutorial are available in Github. Let us start by exploring the data.