[Qgis-developer] Problem getting raster statistics

Victor Olaya volayaf at gmail.com
Tue Apr 3 04:41:49 EDT 2012


Hi all

I am trying to get statistics from a raster layer, using the
bandStatistics() method. I get the statistics object, but it seems
that it hasn't been initialized. According to the documentation,
calling this method should compute the statistics (it warns against
using it often, since that calculation takes time), but it seems it is
not doing it. Am I doing anything wrong? any suggestion? I haven't
found any other method to force the calculation of stats, but just one
hasStatistics to check if they have already been computed.

Regards

Victor


More information about the Qgis-developer mailing list