Martin-Jung / LecoS

LecoS QGis Plugin - Contains several analytical functions for land cover analysis
GNU General Public License v3.0
21 stars 19 forks source link

Qgis3 #17

Closed caiohamamura closed 5 years ago

caiohamamura commented 5 years ago

Fixes based on this comment by @Martin-Jung .

Hi @caiohamamura,

Great work. The GUI seems to work now as far as I can see. The nlmpy algorithms do work as well. I have not yet tested all algorithms, but found a number of other issues that did not happen before.

  • [ ] The query raster values tool returns an error that previously did not occur
/lecos_sextantealgorithms.py", line 922, in processAlgorithm
lyr = ds.GetLayer()
AttributeError: 'NoneType' object has no attribute 'GetLayer'
  • [ ] The vector overlay returns an error for all algorithms. Probably wrong library connection or similar. Test it out with the data I supplied.
Processing algorithm…
Algorithm 'Overlay raster metrics (Polygons)' starting…
Input parameters:
{ 'ADDTABLE' : False, 'CMETRIC' : 1, 'IS_CLASS' : True, 'LAND_GRID' : 'TEST_Lecos.tif', 'LC_CLASS' : 11, 'LMETRIC' : 0, 'OUTPUT_FILE' : 'memory:', 'VECTOR_GRID' : 'test_center.shp' }

Traceback (most recent call last):
File "/home/martin/.local/share/QGIS/QGIS3/profiles/default/python/plugins/LecoS/lecos_sextantealgorithms.py", line 856, in processAlgorithm
f = open(output, "wb" )
TypeError: expected str, bytes or os.PathLike object, not NoneType
  • [ ] Something that I found somewhat annoying is that processing created raster files seem to ignore the project CRS, which did not happen before in QGIS 2. Do you happen to know how to query the currently set CRS and set it as default for all created files? At the moment raster files from the Landscape preparation NLMpy toolbox use WGS84 by default