Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nansat.exceptions.NansatProjectionError: Proj4 or WKT (+proj=stere +lon_0=-31.828345 +lat_0=83.722802 +no_defs) is wrong, need help.thank you! #542

Open
LooperzZ opened this issue May 3, 2024 · 3 comments

Comments

@LooperzZ
Copy link

LooperzZ commented May 3, 2024

No description provided.

@aperrin66
Copy link
Member

Hi @LooperzZ , could you please provide more details on what you r are trying to do, and ideally a code snippet that allows us to reproduce this error? Thank you!

@LooperzZ
Copy link
Author

LooperzZ commented May 3, 2024

C:\software\Anaconda3\envs\pytorch_gpu\lib\site-packages\nansat-1.5.3-py3.7-win-amd64.egg\nansat_init_.py:35: UserWarning: Cannot register C pixel functions!
Either nansat was not installed using setup.py or
pixel functions were not compiled automatically.
For development, use "python setup.py build_ext --inplace"
to compile pixel functions manually into the source tree.

''')
DLL load failed: 找不到指定的模块。
Traceback (most recent call last):
File "D:\Python_code\sea_ice_drift-master\examples\simple.py", line 27, in
from sea_ice_drift import SeaIceDrift
File "D:\Python_code\sea_ice_drift-master\sea_ice_drift_init_.py", line 3, in
from sea_ice_drift.lib import (get_uint8_image,
File "D:\Python_code\sea_ice_drift-master\sea_ice_drift\lib.py", line 375, in
def get_drift_vectors(n1, x1, y1, n2, x2, y2, nsr=NSR(), **kwargs):
File "C:\software\Anaconda3\envs\pytorch_gpu\lib\site-packages\nansat-1.5.3-py3.7-win-amd64.egg\nansat\nsr.py", line 65, in init
self.ImportFromEPSG(4326)
File "C:\software\Anaconda3\envs\pytorch_gpu\lib\site-packages\osgeo\osr.py", line 772, in ImportFromEPSG
return _osr.SpatialReference_ImportFromEPSG(self, *args)
RuntimeError: PROJ: proj_create_from_database: C:\software\Anaconda3\envs\pytorch_gpu\Library\share\proj\proj.db lacks DATABASE.LAYOUT.VERSION.MAJOR / DATABASE.LAYOUT.VERSION.MINOR metadata. It comes from another PROJ installation.

@aperrin66
Copy link
Member

It seems you have a problem with your installation of the PROJ library. Most likely, you have multiple versions of PROJ installed and GDAL is not using the right one.
Maybe you can fix it by setting the PROJ_LIB environment variable to the path to the right proj.db file (see https://gdal.org/drivers/raster/gtiff.html#georeferencing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants