HUB Flow / ImageStatistics
Issue #129
resolved
In enmap-box\enmapbox\coreapps\imagestatisticsapp\imagestatistics.py -> def computeStats(..) the HUB Flow API is called to get the band statistics.
However, a call like
min, max, mean, n = image.basicStatistics(bandIndicies=[bandInd], mask=mask, grid = grid) # , controls=controls)
(see also the example in https://bitbucket.org/hu-geomatics/hub-workflow/src/master/hubflow/examples/examples2.py )
raises an Error like
AttributeError: 'Raster' object has no attribute 'basicStatistics'
Traceback (most recent call last):
File "C:\Users\geo_beja\Repositories\QGIS_Plugins\enmap-box\enmapbox\coreapps\imagestatisticsapp\imagestatistics.py", line 68, in <lambda>
self.computebtn.clicked.connect(lambda: self.computeStats())
File "C:\Users\geo_beja\Repositories\QGIS_Plugins\enmap-box\enmapbox\coreapps\imagestatisticsapp\imagestatistics.py", line 245, in computeStats
min, max, mean, n = image.basicStatistics(bandIndicies=[bandInd], mask=mask) # , controls=controls)
AttributeError: 'Raster' object has no attribute 'basicStatistics'
Comments (2)
-
-
- changed status to resolved
- Log in to comment
rtd website is now online. find an usage example here:
https://hub-workflow.readthedocs.io/en/latest/hubflow_core.html#hubflow.core.Raster.statistics