Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I can open it but the raster band has not been transferred correctly. I guess this is a new issue. Therefore, I will close this question and open a new issue.
Thank you both for your comments. I think I got a step further. I actually manage to create a shape file but it's still not fully working. I've adjusted my question.
Thank you for your superb answer! It seems to work perfectly fine. I checked raster['cell_area'].sum() and it deviates by only 1% (510063456035226.2 / 510065880972871.75 = 0.9999952458344382) from the result I cross-linked in my answer (I guess the deviation is caused by e.g. post-digit differences in e.g. the earth radius). But your approach is much much quicker! ... perfect answer! Thanks!
@bugmenot123 Thank you for your comments! Sorry but I cannot recall where I stumbled upon that information. It may have even been Stackexchange but I cannot find it anymore. Regarding the 2nd comment I am not a hundred percent sure what you mean. I provided all the code in the minimal working example.
Thank you for your comment. This answer seems to work: gis.stackexchange.com/a/166421/97137; However, it's rather slow. ~25 iterations per second. That's too slow for my >250,000 rows.
Thank you for your comment. I uninstalled and reinstalled to version 3.14.16 which did not solve the problem. However, creating a new user profile worked! :)