[Qgis-developer] Ticket 778 and slow loading rasters
ersts at amnh.org
Wed Apr 16 10:31:53 EDT 2008
Carlos Dávila has been good enough to keep reminding me of Ticket 778
(http://trac.osgeo.org/qgis/ticket/778) and supplied me with one of his
ecw images. The image that Carlos sent me is 53k pixels by 14k pixels
and it took about 106 seconds to load on my older desktop.
The slowness on initial load has to do with determining the min and max
values for contrast enhancement, the default is a linear min-max
stretch. On initial load of a raster, we have it set so that GDAL
provides an approximation of the min and max for each band, later the
user can elect to load the actual min max -- very slooooow right now.
Even with only asking for an approximation, with an image that size
there is going to be a bit of a delay. If you set the default contrast
enhancement to "no stretch" these same data load in only 2 seconds.
Originally, we had the default contrast enhancement set to "no stretch"
but that was met with some pretty strong opposition, so simply changing
the default behavior is not an option. So I propose a slight compromise
and would like to know how everyone feels about it.
--> 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
--> Add an "approximation" and "actual" option to the raster properties
window for the "Load min max from band" button
Rational: very large images are probably a mosaic of some type and
already have been preprocessed to some extent and therefore probably
don't actually need to be stretched. This way, smaller images will still
always be stretch and users will see what they expect and larger data
will load considerably faster. The threshold will have to be though
about, but I was thinking something around 75 million pixels. Something
larger than a Landsat ETM.
Let me know your thoughts or if you have any reservations.
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
Quantum GIS Raster Development Team. Visit http://www.qgis.org
to learn more about QGIS, a free and open source desktop GIS
...evolving through community cooperation to change the world bit by bit
More information about the Qgis-developer