ds.rio.write_crs('epsg:4326', inplace=True) gives an error #447
Unanswered
shuai-zhou
asked this question in
Q&A
Replies: 1 comment 9 replies
-
For the first error, it seems GDAL is having issues finding the PROJ database that is expected. I would check the PROJ_LIB environment variable. |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I did some tests on my Windows machine, everything works fine. But when I was working on a Linux-based HPC, the following line:
gives an error:
ERROR 1: PROJ: proj_create_from_database: conda_env_name/share/proj/proj.db lacks DATABASE.LAYOUT.VERSION.MAJOR / DATABASE.LAYOUT.VERSION.MINOR metadata. It comes from another PROJ installation.
This error did not stop the script, but when clipping a dataset using
clipped = ds.rio.clip(geodf.geometry.apply(mapping), geodf.crs)
, another error occurs:CRS not found. Please set the CRS with 'rio.write_crs()'. Data variable: precipitation
Probably because the first error (
Error 1: PROJ: proj_create_from_database...
) did not write a CRS? How can I fix the first error? Thanks.Beta Was this translation helpful? Give feedback.
All reactions