nansencenter / nansat

Scientist friendly Python toolbox for processing 2D satellite Earth observation data.
http://nansat.readthedocs.io
GNU General Public License v3.0
181 stars 66 forks source link

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 5 months ago

aperrin66 commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

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).