Code Monkey home page Code Monkey logo

lecos's Introduction

Description:
LecoS - Land cover statistics is plugin for the QGIS GIS software suite. It converts classified raster layers to arrays using the powerful numpy library. Based on a Connected Component Labeling approach it further identifies class patches and calculates landscape metrics. The use can choose to calculate single or several metrics for the raster classes.

Usecase:
See http://conservationecology.wordpress.com/lecos-land-cover-statistics/

Licence:
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Reference:
Martin Jung, LecoS — A python plugin for automated landscape ecology analysis, Ecological Informatics, Volume 31, January 2016, Pages 18-21, ISSN 1574-9541, http://dx.doi.org/10.1016/j.ecoinf.2015.11.006.

lecos's People

Contributors

agiudiceandrea avatar caiohamamura avatar kalab-oto avatar lselzer avatar martin-jung avatar pzatelli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

lecos's Issues

Selecting Class in Polygon batch overlay crashes QGis in Ubuntu

Steps to reproduce:

Open Qgis
import polygons (in my case, circles created from a fixed distance buffer based on points)
import a raster (in my case, land cover raster, of the same projection)
install LeCos (I have the latest version)
Select Landscape Vector overlay
Select class

The screen first freezes and then crashes.

Using Lecos latest version, Qgis 2.18.16, Ubuntu 16.04 LTS.

Issue does not happen on Windows using exact same project file with up-to date QGis and Lecos plugin.

Error message using "Overlay raster metrics (Polygons)"

Hello,

I am using the recent release of LecoS (3.0) with QGIS 3.6.3. When trying to run an operation with "overlay raster metrics" to calculate landcover within a vector overlay (a shapefile of 1000m2 buffers) I get the following error message.


Traceback (most recent call last):
File "C:/Users/mrobinson/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\LecoS\lecos_sextantealgorithms.py", line 821, in processAlgorithm
bat = pov.BatchConverter(inputFilename,vectorFilename,None)
File "C:/Users/mrobinson/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\LecoS\landscape_polygonoverlay.py", line 121, in init
self.lyr = self.shapef.GetLayer()
AttributeError: 'NoneType' object has no attribute 'GetLayer'

Execution failed after 0.03 seconds


I eventually want to do this as a batch process, calculating multiple metrics.

Thanks in advance!

Landscape vector overlay if vector polygons have "holes"

The Landscape vector overlay function does not work if polygons have internal "holes" within them

This is a "known" bug as LecoS is unable to compute metrics to Multi-polygon features. By adding a hole to a polygon you are changing its type from WKB_POLYGON to WKB_MULTIPOLYGON (because It now has additional boundary nodes).

There is no easy fix for holes yet and this requires a lot more work which is why LecoS is currently unable to compute metrics for Multipolygons. What it technically need to compute is to clip out all raster parts between the individual features and mosaic them together. If the features of a Multipolygon are spatially seperated than you could split them into individual parts before the computation.

Todo:

  • Write a new subroutine that loops through individual WKB_polygons of a WKB_multipolygon and find a way to combine their results

numpy import error (module version conflict 0xb vs 0xa)

Trying to install the LecoS plugin v2.0.7 on Linux but getting some numpy related errors:

First error:

Python error[1] RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa

Second error:

Python warning[1] warning:/usr/lib/python2.7/site-packages/osgeo/gdal.py:107: DeprecationWarning: gdalnumeric.py was placed in a namespace, it is now available as osgeo.gdalnumeric
  DeprecationWarning)

traceback:  File "<string>", line 1, in <module>
  File "/usr/share/qgis/python/pyplugin_installer/installer.py", line 253, in showPluginManagerWhenReady
    iface.pluginManagerInterface().showPluginManager(tabIndex)
  File "<string>", line 1, in <module>
  File "/usr/share/qgis/python/pyplugin_installer/installer.py", line 305, in installPlugin
    plugins.getAllInstalled(testLoad=True)
  File "/usr/share/qgis/python/pyplugin_installer/installer_data.py", line 718, in getAllInstalled
    plugin = self.getInstalledPlugin(key, path=path, readOnly=readOnly, testLoad=testLoadThis)
  File "/usr/share/qgis/python/pyplugin_installer/installer_data.py", line 624, in getInstalledPlugin
    pkg.classFactory(iface)
  File "/home/saultdon/.qgis2/python/plugins/LecoS/__init__.py", line 35, in classFactory
    from lecos_main import LecoS
  File "/usr/share/qgis/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/saultdon/.qgis2/python/plugins/LecoS/lecos_main.py", line 37, in <module>
    from lecos_dlg import LecosDialog
  File "/usr/share/qgis/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/saultdon/.qgis2/python/plugins/LecoS/lecos_dlg.py", line 37, in <module>
    import landscape_statistics as lcs
  File "/usr/share/qgis/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/saultdon/.qgis2/python/plugins/LecoS/landscape_statistics.py", line 62, in <module>
    import gdalnumeric
  File "/usr/share/qgis/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/usr/lib/python2.7/site-packages/gdalnumeric.py", line 3, in <module>
    deprecation_warn('gdalnumeric')

src/core/qgsmessagelog.cpp: 45: (logMessage) [3ms] 2017-06-20T10:53:11 Python error[1] RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa

Third error:

The plugin is broken. Python said:
numpy.core.multiarray failed to import

I have the following installed:
python2-numpy 1.13.0
python2-scipy 0.19.0
python2-pillow 4.1.1
gdal 2.2.r39205
qgis 2.18.9.r97.g5ef70f1ab7

I tried to recompile them in the order listed above. Do you think this is related to GDAL?

I'm guessing that it could be a GDAL issue, but not entirely sure because I did the following in python2 terminal and can manually import numpy.core.multiarray but not gdalnumeric or osgeo.gdalnumeric

>>> from gdal import *
>>> from numpy import *
>>> import gdalnumeric
RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/gdalnumeric.py", line 5, in <module>
    from osgeo.gdal_array import *
  File "/usr/lib/python2.7/site-packages/osgeo/gdal_array.py", line 28, in <module>
    _gdal_array = swig_import_helper()
  File "/usr/lib/python2.7/site-packages/osgeo/gdal_array.py", line 24, in swig_import_helper
    _mod = imp.load_module('_gdal_array', fp, pathname, description)
ImportError: numpy.core.multiarray failed to import
>>> import osgeo.gdalnumeric
RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/osgeo/gdalnumeric.py", line 1, in <module>
    from osgeo.gdal_array import *
  File "/usr/lib/python2.7/site-packages/osgeo/gdal_array.py", line 28, in <module>
    _gdal_array = swig_import_helper()
  File "/usr/lib/python2.7/site-packages/osgeo/gdal_array.py", line 24, in swig_import_helper
    _mod = imp.load_module('_gdal_array', fp, pathname, description)
ImportError: numpy.core.multiarray failed to import
>>> import numpy.core.multiarray
>>>

Error in float() argument

Hello everyone,
I am using the plug-in LecoS (version 3.0.1.) on QGis (3.22.14) trying to perform a landscape proportion metrics within the Overlay Raster Metrics (Polygons) function.
Unfortunately, the process have failed returning this error:

Traceback (most recent call last):
File "C:\Users/anita/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\LecoS\lecos_sextantealgorithms.py", line 865, in processAlgorithm
r.append(float(item[feature][2]))
TypeError: float() argument must be a string or a number, not 'NoneType'

Execution failed after 65.88 secondi (1 minuto 6 secondi)

My input parameters are:

{ 'ADDTABLE' : False, 'CMETRIC' : 1, 'IS_CLASS' : True, 'LAND_GRID' : 'C:/Users/anita/Documents/LAVORO/UNIFI_Materiali/GIS_Progetti/Progetto_Lecos/Toscana_raster_3035_nodata.tif', 'LC_CLASS' : 1, 'LMETRIC' : 0, 'OUTPUT_FILE' : 'TEMPORARY_OUTPUT', 'VECTOR_GRID' : 'C:/Users/anita/Documents/LAVORO/UNIFI_Materiali/GIS_Progetti/Progetto_Lecos/2017_SP_Buffer100m.shp' }

I don't understand what the problem is, anyone could help me?

Thank you in adavance!

Python "TypeErrors" for some Lecos functions

  1. Landscape Metrics tab
    When trying to calculate min., max., or median, this error is thrown:
    TypeError: amin() [or respective other function] got an unexpected keyword argument 'dtype'
    Other metrics can be calculated OK.

  2. Landscape Vector Overlay tab
    All calculation attempts here result in
    TypeError: in method 'DataSource_ExecuteSQL', argument 2 of type 'char const *'

Full details and test data are in the attached report.
Lecos_Issues_ME.zip

No results - stalling and delays - vector overlay

I'm trying to collect data along highway segments in northern Alberta. I took vector data from ABMI (http://www.abmi.ca/home.html) and rasterized this to work within LecoS. I had success in early attempts to extract data using the vector overlay function. The road segments are mortality hot spots and cold spots estimated using KDE+ software. I selected the center of each segment to create a 500 m circular buffer to sample the surrounding landscape. I have other raster layers that I'm hoping to use in my summary analysis and will be expanding the sampling to different buffer sizes.

Everything was working in early trials with LecoS. I saved my workspace and the next day found that I could no longer extract LecoS metrics. I went through the entire process of rasterizing, projecting, and clipping the data to see if going from scratch would work. I tried uninstalling and re-installing LecoS, but this has not solved my problem. I left it running overnight - still no table is generated. I've kept the analysis simple by selecting only one metric at a time.

I'm using QGIS V. 2.18.21. LecoS prompts a response in the bottom left of my workspace "Land cover calculated for feature 58 out of 58 (0 impossible)". I clipped the raster in an attempt to make the analysis space smaller. However, nothing happens after this. I've tried saving to a file, adding table to workspace, and save int he attribute table - none of these options are working.

I've uploaded my raster and the buffer into Dropbox to see if I someone can try to execute and recreate the error. The vector data came from ABMI - so it is projected in Alberta 10-TM (Forest) EPSG:3400, NAD83.

https://www.dropbox.com/sh/uuzv8iw6ek09afd/AABwAGkBDBXLH3sfawm5ItxLa?dl=0

Thank you!

Processing interface raises an error on Windows machines

Hi,

QGIS 2.16.3 on Windows, processing 2.12.99

I'm not able to display any user interface, all tools return one of these 2 errors

\lecos_sextantealgorithms.py", line 1104, in processAlgorithm
nodata = lcs.f_returnNoDataValue(str(inputFilename)) # Get Nodata-value
AttributeError: 'NoneType' object has no attribute 'f_returnNoDataValue'
\lecos_sextantealgorithms.py", line 162, in processAlgorithm
what = self.w[self.getParameterValue(self.WHAT)]
TypeError: list indices must be integers, not NoneType

I have no error on Linux.

MemoryError

I’m very interested in the application of this software for my research into amphibian populations in northern British Columbia. I accessed LiDAR and forest cover data from the following source:

https://landcover.usgs.gov/glc/TreeCoverDescriptionAndDownloads.php

and

http://glad.umd.edu/gladmaps/globalmap.php#

This data was used with LecoS software in the following publication:

https://wwwnc.cdc.gov/eid/article/22/2/15-0656_article

I have QGIS 2.18.12 installed on my Windows 10 Pro computer. I believe that Nimby is installed as a default with this version?

I receive the following error each time I attempt to obtain information from the forest cover data set:


2017-09-29T08:25:33	1	Traceback (most recent call last):
			  File "C:/Users/mthompson/.qgis2/python/plugins\LecoS\lecos_dlg.py", line 128, in setNoData
			    band = raster.GetRasterBand(1)
			AttributeError: 'NoneType' object has no attribute 'GetRasterBand'
			
2017-09-29T08:25:44	1	Traceback (most recent call last):
			  File "C:/Users/mthompson/.qgis2/python/plugins\LecoS\lecos_dlg.py", line 128, in setNoData
			    band = raster.GetRasterBand(1)
			AttributeError: 'NoneType' object has no attribute 'GetRasterBand'
			
2017-09-29T08:27:06	1	Traceback (most recent call last):
			  File "C:/Users/mthompson/.qgis2/python/plugins\LecoS\lecos_dlg.py", line 320, in accept
			    classes, array = lcs.f_landcover(rasterPath,nodata)
			  File "C:/Users/mthompson/.qgis2/python/plugins\LecoS\landscape_statistics.py", line 134, in f_landcover
			    array =  band.ReadAsArray()
			  File "C:\PROGRA~2\QGIS2~1.18\apps\Python27\lib\site-packages\osgeo\gdal.py", line 2441, in ReadAsArray
			    callback_data = callback_data)
			  File "C:\PROGRA~2\QGIS2~1.18\apps\Python27\lib\site-packages\osgeo\gdal_array.py", line 340, in BandReadAsArray
			    buf_obj = numpy.empty([buf_ysize,buf_xsize], dtype = typecode)
			MemoryError

I’m hoping that you might be able to provide some insight into my issues.

Thank you!!

Python error when performing Lanscape Statistics in LecoS (numpy.core._exceptions._ArrayMemoryError)

Hi! I recently installed LecoS from the plugin repository on my QGIS 3.22.4
When I try to run any of the available Landscape Statistics on my raster file, I get the following error message:


numpy.core._exceptions._ArrayMemoryError: Unable to allocate 11.9 GiB for an array with shape (128069, 99432) and data type uint8
Traceback (most recent call last):
File "C:\Users/humbo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\LecoS\lecos_dlg.py", line 408, in accept
classes, array = lcs.f_landcover(rasterPath,nodata) # Get classes and value
File "C:\Users/humbo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\LecoS\landscape_statistics.py", line 137, in f_landcover
array = band.ReadAsArray()
File "C:\PROGRA1\QGIS321.4\apps\Python39\lib\site-packages\GDAL-3.4.1-py3.9-win-amd64.egg\osgeo\gdal.py", line 3653, in ReadAsArray
return gdal_array.BandReadAsArray(self, xoff, yoff,
File "C:\PROGRA1\QGIS321.4\apps\Python39\lib\site-packages\GDAL-3.4.1-py3.9-win-amd64.egg\osgeo\gdal_array.py", line 422, in BandReadAsArray
buf_obj = numpy.empty([buf_ysize, buf_xsize], dtype=typecode)
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 11.9 GiB for an array with shape (128069, 99432) and data type uint8
Versione Python: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]
Versione di QGIS: 3.22.4-Białowieża Białowieża, ce8e65e9

Do you know what am I doing wrong? I am not trained in python, therefore I cannot catch the meaning of the message.
Than you very much!

Bug in poligon overlay

Hello, I'm having the same bug as here http://hub.qgis.org/issues/14700#change-69751
I would have posted there but I can't sign up because the sign up page has been under maintenance over the last three days.

I got this error:
2016-05-06T13:55:56 1 Traceback (most recent call last): File "C:/Users/lucia/.qgis2/python/plugins\LecoS\lecos_dlg.py", line 872, in accept err, r = bat.go(cmd,cl,cellsize,None,rasE) File "C:/Users/lucia/.qgis2/python/plugins\LecoS\landscape_polygonoverlay.py", line 151, in go array = self.getClipArray(poly) File "C:/Users/lucia/.qgis2/python/plugins\LecoS\landscape_polygonoverlay.py", line 342, in getClipArray premask = self.imageToArray(rasterPoly) File "C:/Users/lucia/.qgis2/python/plugins\LecoS\landscape_polygonoverlay.py", line 249, in imageToArray a=numpy.fromstring(i.tobytes(),'b') File "C:\PROGRA~1\QGISES~1\apps\Python27\lib\site-packages\PIL\Image.py", line 512, in __getattr__ raise AttributeError(name) AttributeError: tobytes

And I have updated numpy and (after great pain) scipy
`
import numpy

numpy.version

'1.11.0'

import scipy

scipy.version

'0.17.0'

import Image

Image.VERSION

'1.1.7'`

I cannot figure out why it doesn't work.

lecos cant find python libraries with QGIS 3.4.5

This is a QGIS standalone issue. I added here: https://issues.qgis.org/issues/21593

Not a Lecos issue. I have retained here just for reference.
Windows 10 - Lecos 3.0.0 cant find PIL with QGIS 3.4.5 standalone (traceback below).
Appears that in the case of the standalone installed QGIS that the python library path used by lecos is mis-specified (1.4 when should be 3.4). PIL is installed via the standalone ........

Impossível carregar complemento 'LecoS' Devido a um erro ao chamar o método Class Factory().

SystemExit: 0

Traceback (most recent call last):
File "C:/Users/Darren/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\LecoS\landscape_polygonoverlay.py", line 58, in
import Image, ImageDraw
File "C:/PROGRA1/QGIS31.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'Image'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:/Users/Darren/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\LecoS\landscape_polygonoverlay.py", line 60, in
from PIL import Image, ImageDraw
File "C:/PROGRA1/QGIS31.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'PIL'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:/PROGRA1/QGIS31.4/apps/qgis-ltr/./python\qgis\utils.py", line 335, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:/Users/Darren/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\LecoS_init_.py", line 36, in classFactory
from .lecos_main import LecoS
File "C:/PROGRA1/QGIS31.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/Darren/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\LecoS\lecos_main.py", line 31, in
from .lecos_sextanteprov import LecoSAlgorithmsProv
File "C:/PROGRA1/QGIS31.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/Darren/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\LecoS\lecos_sextanteprov.py", line 30, in
from .lecos_sextantealgorithms import *
File "C:/PROGRA1/QGIS31.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/Darren/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\LecoS\lecos_sextantealgorithms.py", line 760, in
from . import landscape_polygonoverlay as pov
File "C:/PROGRA1/QGIS31.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/Darren/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\LecoS\landscape_polygonoverlay.py", line 63, in
sys.exit(0)
SystemExit: 0

Versão do Python: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
Versão do QGIS: 3.4.5-Madeira Madeira, 89ee6f6e23

Caminho do Python:

C:/PROGRA~1/QGIS3~1.4/apps/qgis-ltr/./python
C:/Users/Darren/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/Darren/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA~1/QGIS3~1.4/apps/qgis-ltr/./python/plugins
C:\Program Files\QGIS 3.4\bin\python37.zip
C:\PROGRA~1\QGIS3~1.4\apps\Python37\DLLs
C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib
C:\Program Files\QGIS 3.4\bin
C:\PROGRA~1\QGIS3~1.4\apps\Python37
C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages
C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\win32
C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\Pythonwin
C:/Users/Darren/AppData/Roaming/QGIS/QGIS3\profiles\default/python

Hello,

Hello,

Where can I find information on the newest release of LecoS (version 3.0). I am trying to use it with QGIS 3.6.3 but am encountering errors when I try to run applications with the plugin.

I know you need to do custom install for QGIS and include scimpy, numpy, and PIL with the download.

I did that but noticed there were 2 versions of these add-ons - one for python and another for python 3? Does it make a difference which I include and could this be the source of my errors?

If anyone familiar with the recent LocoS release has any recommendations it would be much appreciated.

Thanks in advance!

LecoS Window Issue

Hi Martin,

When I open the LecoS plugin when using QGIS, the pop up window opens really condensed and all of the information is overlapping. When I stretch the window, the information doesn't spread out with the window.

I'm using LecoS V.3.0.0 and this occurs in QGIS 3.10 and QGIS 3.16.

Would you be able to assist me with this please?

Many thanks

Ruth

LecoS Bug

Plugin causes Minidump on QGIS exit

This is a known issue that has been repoted a while ago.
Still don't know how to fix it...


Migrated from hub.qgis.org:

I have found that LecoS causes QGIS to write a minidump every time I close the program. This happened on two computers. Once I removed the plugin, the minidumps stopped.
Note that it is not enough to disable the plugin. It must be removed to alleviate the problem.

  • Figure out why QGIS writes a minidump
  • Fix the problem

Batching though classes is inefficient

Hello, I have been using your software and it works great. Thanks for making it.

I would like to calculate some metrics for all the classes and right now it would very very slow because I have over 50000 polygons. I have profiled the go() function in BatchConverterclass and a third of the time is consumed by numpy.choose() in getClipArray(). Since this is same for each class inside the polygon it would be faster to loop through the desired classes after the clipping is done. I'm willing to do it as it would be rather easy, although I might need help with qgis gui interface. What do you think?

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Specifications:
Ubuntu 18.04
QGIS: 2.18 LTS
scipy: 1.0.1
PIL: 1.1.7
numpy: 1.15.2

I am getting the following error when I try running the Polygon Batch Overlay tool.

`Traceback (most recent call last):
File "/home/sajesh/.qgis2/python/plugins/LecoS/lecos_dlg.py", line 872, in accept
err, r = bat.go(cmd,cl,cellsize,None,rasE)
File "/home/sajesh/.qgis2/python/plugins/LecoS/landscape_polygonoverlay.py", line 151, in go
array = self.getClipArray(poly)
File "/home/sajesh/.qgis2/python/plugins/LecoS/landscape_polygonoverlay.py", line 354, in getClipArray
mask = self.imageToArray(rasterPoly)
File "/home/sajesh/.qgis2/python/plugins/LecoS/landscape_polygonoverlay.py", line 255, in imageToArray
if a != None:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Python version: 2.7.15rc1 (default, Nov 12 2018, 14:31:15) [GCC 7.3.0]
QGIS version: 2.18.26 Las Palmas, 83df334

Python Path:
/usr/share/qgis/python/plugins/processing
/home/sajesh/.qgis2/python/plugins/LecoS
/usr/share/qgis/python
/home/sajesh/.qgis2/python
/home/sajesh/.qgis2/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python2.7
/usr/lib/python2.7/plat-x86_64-linux-gnu
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/home/sajesh/.local/lib/python2.7/site-packages
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/gtk-2.0
/usr/lib/python2.7/dist-packages/wx-3.0-gtk3
/home/sajesh/.qgis2//python
/home/sajesh/.qgis2/python/plugins/mmqgis/forms`

Is it something to do with my numpy/scipy/PIL versions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.