[Qgis-developer] QgsRasterLayer::bandStatistics
Tim Sutton
lists at linfiniti.com
Mon Jun 25 01:33:47 PDT 2012
Hi
On Mon, Jun 25, 2012 at 9:39 AM, Marco Hugentobler
<marco.hugentobler at sourcepole.ch> wrote:
> Hi
>
> While fixing the raster issues (in a branch), I'm trying to clean out the
> raster layer class. Especially, I'm trying to remove symbology related
> elements from the raster layer (like mRedBandName etc.) and have the
> symbology only in the renderers .
>
> Now I'm not sure what to do with the band statistics. QgsRasterLayer stores
> and caches QgsRasterBandStats. However I see in the gdal provider that GDAL
> caches the statistics as well. So my question is if it is ok to remove the
> statistics related members in QgsRasterLayer and go directly to the raster
> providers. Or is there a reason to have it on layer level that I missed?
>
IIRC there is a slow stats gathering implementation in
QgsRasterProvider which is virtual and can overloaded by providers
that are able to get the stats more efficiently. I have some unmerged
code that cleans up the raster stats rendered output which I will
commit after you have done your changes, but no I can't think of any
reason why the provider should not be the canonical source for stats
and the stats calls in the raster layer class removed.
By the way I just noticed that the histogram tool in raster properties
is not working any more for me.
Regards
Tim
> Regards,
> Marco
>
> --
> Dr. Marco Hugentobler
> Sourcepole - Linux & Open Source Solutions
> Weberstrasse 5, CH-8004 Zürich, Switzerland
> marco.hugentobler at sourcepole.ch http://www.sourcepole.ch
> Technical Advisor QGIS Project Steering Committee
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
--
Tim Sutton - QGIS Project Steering Committee Member (Release Manager)
==============================================
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.
Visit http://linfiniti.com to find out about:
* QGIS programming and support services
* Mapserver and PostGIS based hosting plans
* FOSS Consulting Services
Skype: timlinux
Irc: timlinux on #qgis at freenode.net
==============================================
More information about the Qgis-developer
mailing list