danioxoli / HotSpotAnalysis_Plugin

A QGIS plugin for hotspot analysis
GNU General Public License v3.0
55 stars 12 forks source link

issue with hotspot analysis #29

Closed ghost closed 4 years ago

ghost commented 5 years ago

An error has occurred while executing Python code:

TypeError: '>=' not supported between instances of 'Chain' and 'Chain' Traceback (most recent call last): File "C:/Users/k krishna rani samal/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 531, in self.dlg.comboBox.currentIndexChanged.connect(lambda: self.load_comboBox()) File "C:/Users/k krishna rani samal/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 472, in load_comboBox

thresh = pysal.min_threshold_dist_from_shapefile(path)

File "C:\OSGEO4~1\apps\Python37\lib\site-packages\pysal\weights\user.py", line 1085, in min_threshold_dist_from_shapefile return min_threshold_distance(points, p) File "C:\OSGEO4~1\apps\Python37\lib\site-packages\pysal\weights\util.py", line 1136, in min_threshold_distance kd = KDTree(data) File "C:\OSGEO4~1\apps\Python37\lib\site-packages\pysal\cg\kdtree.py", line 52, in KDTree return scipy.spatial.KDTree(data, leafsize) File "C:\OSGEO4~1\apps\Python37\lib\site-packages\scipy\spatial\kdtree.py", line 239, in init self.maxes = np.amax(self.data,axis=0) File "C:\OSGEO4~1\apps\Python37\lib\site-packages\numpy\core\fromnumeric.py", line 2505, in amax initial=initial) File "C:\OSGEO4~1\apps\Python37\lib\site-packages\numpy\core\fromnumeric.py", line 86, in _wrapreduction return ufunc.reduce(obj, axis, dtype, out, **passkwargs) TypeError: '>=' not supported between instances of 'Chain' and 'Chain'

danioxoli commented 5 years ago

Hello,

It looks like an error due to an improper input file:

1) Be sure that you are not using a virtual layer or CSV as input (you must use shapefile that is stored somewhere in your file system) 2) Be sure that the input shapefile is projected

Be sure not to use non-numeric or virtual filed (eg from a join operation) as analysis variable. If you have active raster layers in your project, these should be placed below your shape file in the layers panel.

Let me know if this was helpful!

Best,

Daniele