[Qgis-developer] Ticket 778 and slow loading rasters

Peter Ersts ersts at amnh.org
Wed Apr 16 13:33:34 EDT 2008


Frank Warmerdam wrote:
> I would be interested to investigate why getting approximate statistics
> for this file is so slow.  I does not seem like it ought to be.
>
> In fact the ECW driver in GDAL is somewhat special in that it does not
> have fixed overview levels, which means that approximate statistics are
> computed by fetching a sampling of full resolution blocks.  I think it
> would be better to fix this by modifying GDAL to select an appropriate
> resolution and read the whole image highly decimated to get statistics
> for formats like ECW with "arbitrary" overviews.
>
> I'll work on this now and see if it helps alot.
>

Thanks Frank, that sounds great but we may still want to consider a QGIS 
work around for the time being as well. The threshold idea I am 
proposing would only take about 3 or 4 lines of code.

FYI, I used the GDAL 1.5 stable branch and version 3.3 (2006-08-29) of 
ECW JPEG 2000 SDK.


>
>> --> Keep the default contrast enhancement as linear min-max on initial
>> --> If the total number of pixels in the image is greater than some 
>> threshold revert back to "no stretch" as the default on initial load
>
> I would like to think this isn't necessary.  I am however confused
> about why 8bit images are stretched by default.  The default rule in
> OpenEV for instance is to do no stretching for 8bit images, but to
> use linear stretch for non-8bit images. 

There never really was a concerted design decision about stretching 
8-bit data. I can see an argument for or not doing it, but with 
everything equal and the speed at which GDAL can give an approximate min 
max, I say why not.


-pete

-- 
====================================
Peter J. Ersts, Project Specialist
American Museum of Natural History
Center for Biodiversity and Conservation
Central Park West at 79th Street
New York, New York 10024
Tel: Home Office (518)-632-4745 or NYC Office (212)-496-3488
Web: http://biodiversityinformatics.amnh.org
Web: http://cbc.amnh.org

Quantum GIS Raster Development Team. Visit http://www.qgis.org
to learn more about QGIS, a free and open source desktop GIS

Open Source,
...evolving through community cooperation to change the world bit by bit



More information about the Qgis-developer mailing list