exactextract
provides a fast and accurate algorithm for summarizing values in the portion of a raster dataset that is covered by a polygon, often referred to as zonal statistics. Implemented in C++, it is available through a command line interface as well as packages for Python and R. More information is available in the project documentation.