[Qgis-developer] QgsRasterLayer::bandStatistics

Etienne Tourigny etourigny.dev at gmail.com
Sat Jul 14 12:01:59 PDT 2012


hi Guys,

I didn't find any major changes pushed to github about this topic?

I have just pushed my histogram fixes, and some changes to
qgsrasterlayer and qgsrasterdataprovider (see other email).

Like other stats stuff there is duplication.  How should we proceed -
pull all stats stuff in QgsRasterDataProvider, and call them directly?

I found a possible bug : theIgnoreOutOfRangeFlag is forgotten after it
is set in QgsGdalProvider::populateHistogram() - perhaps cleaning up
the raster stats would fix that?


Etienne

On Mon, Jun 25, 2012 at 5:44 AM, Marco Hugentobler
<marco.hugentobler at sourcepole.ch> wrote:
> Hi Tim
>
> Thanks for the info about the stats. I'm going to commit what I have so far
> as it already fixes some issues.
>
>
>> By the way I just noticed that the histogram tool in raster properties
>> is not working any more for me.
>
>
> This should work again after the next commit.
>
> Regards,
> Marco
>
> Am 25.06.2012 10:33, schrieb Tim Sutton:
>
>> 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
>>
>>
>>
>
>
> --
> 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


More information about the Qgis-developer mailing list