I downloaded Population Count data from Gridded Population of the World (GPW), v4 as a *.GeoTIFF file. In a next step, I would like to extract the population count of a given area based on a mask layer (e.g. the political boundaries of Portugal imported from a *.geojson).
I came across an answer on StackExchange, which I believe is trying to achieve a similar result. However, I could not reproduce it due to NotImplementedError: multi-dimensional sub-views are not implemented and I suspect the solution would be overengineered for me.
When I open the *.GeoTIFF file in QGIS and display the layer properties, I see the following information (I suppose, I am interested in the STATISTICS_MEAN):
The files are avialble for download here (only for seven days or 100 downloads though):
GeoTIFF: https://send.firefox.com/download/a4be075f0dda3acb/#UlUv5RDx8i3XXvV4dQHtEA Geojson: https://send.firefox.com/download/54d3458a17ca355a/#DM8M3hGOfcoIDOVeKcMZJA


CRSError: The EPSG code is unknown.. The error is described here https://rasterio.readthedocs.io/en/latest/faq.html but I was not able to solve it yet. – Stücke Jan 29 '20 at 07:25pip install gdalorconda install -c conda-forge gdal. – Stücke Jan 31 '20 at 12:22conda install -c conda-forge gdal. I was able to successfully install it without any error but I do receive a new error when I run the script https://pastebin.com/vDSXxmGk – Stücke Feb 03 '20 at 07:24UBAisn't in your environment variables. Not sure what that is. – snowman2 Feb 04 '20 at 02:29