UMEP-dev / UMEP-processing

7 stars 9 forks source link

SOLWEIG warning #74

Open CDelasse opened 2 months ago

CDelasse commented 2 months ago

I get this error when I execute solweig : WARNING Traceback (most recent call last): File "C:\Users/cdelasse01/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\UMEP\SOLWEIG\solweig.py", line 372, in start_progress lonlat = transform.TransformPoint(minx, miny) File "C:\PROGRA~1\QGIS33~1.2\apps\Python39\lib\site-packages\osgeo\osr.py", line 1079, in TransformPoint return _osr.CoordinateTransformation_TransformPoint(self, *args) TypeError: Wrong number or type of arguments for overloaded function 'CoordinateTransformation_TransformPoint'. Possible C/C++ prototypes are: OSRCoordinateTransformationShadow::TransformPoint(double [3]) OSRCoordinateTransformationShadow::TransformPoint(double [4]) OSRCoordinateTransformationShadow::TransformPoint(double [3],double,double,double) OSRCoordinateTransformationShadow::TransformPoint(double [4],double,double,double,double) Could it be from meteorological data? Thanks in advance

biglimp commented 2 months ago

This is most likely an error related to the CRS of your geodata. Use a common CRS in meter e.g. UTM

CDelasse commented 2 months ago

I used EPSG:2154 (France) which is also in meter File "C:\Users/.../QGIS/QGIS3\profiles\default/python/plugins\UMEP\SOLWEIG\solweig.py", line 1001, in start_progress WriteMetadataSOLWEIG.writeRunInfo(self.folderPath[0], self.filepath_dsm, self.gdal_dsm, self.usevegdem, File "C:\Users/cdelasse01/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\UMEP\SOLWEIG\WriteMetadataSOLWEIG.py", line 40, in writeRunInfo file.write('Projected reference system: ' + srs.GetAttrValue('projcs')) TypeError: can only concatenate str (not "NoneType") to str

biglimp commented 2 months ago

IT might be that EPSG:2154 cannot translate into WGS84 cos they are using different ellipsoids (geographical coordinate systems.

CDelasse commented 2 months ago

What can I do to solve this issue

biglimp commented 2 months ago

@j3r3m1 , do you have any experience with EPSG:2154?

I suggest you try to reproject your data into some UTM CRS or update to RGF93 v2

image

CDelasse commented 2 months ago

I reprojected the data to another CRS, it works but not sure if it affected the accuracy. Does solweig have a condition on the CRS ?

j3r3m1 commented 2 months ago

@j3r3m1 , do you have any experience with EPSG:2154?

Yes most of the data provided by the French National Geographic Institute use this CRS. I have never faced such problem even thought I have not been using SOLWEIG a lot.