zonal_stats returns PROJ error
AL89 opened this issue · 1 comments
Hi
Is it just me who gets this error/message when trying to import zonal_stats
from the rasterstatsmodule
?
In [1]: from rasterstats import zonal_stats
PROJ: proj_create_from_database: Cannot find proj.db
Nevertheless I tried to use it in my code, and then I got this error: CPLE_AppDefinedError: PROJ: proj_create_from_database: Cannot find proj.db
I have also posted a Stack Exchange post here: https://gis.stackexchange.com/questions/375361/zonal-stats-returns-proj-error
This appears to be an issue with the installation of dependencies (GDAL and proj) not with rasterstats. As suggested in the stackexchange comments, setting the PROJ_LIB
environment variable to point to the directory where your proj.db
resides should fix the issue. If not, the GDAL issue tracker would be the best place to ask this question.