[Qgis-user] Metis and creating pyramids
Maciej Sieczka
tutey at o2.pl
Tue Jul 29 03:53:58 PDT 2008
Micha Silver pisze:
> Maciej Sieczka wrote:
>>> (BTW I didn't use BLOCKYSIZE=1 as that gave an error ).
>> It shouldn't. It's a valid TIFF creation option. What error
>> exactly?
> $ gdal_translate -of GTiff -co "TILED=YES" -co "BLOCKYSIZE=1"
> Yotvata.jpg Yotvata.tif
> Input file size is 8017, 5532
> 0ERROR 1: _TIFFVSetField:Yotvata.tif: Bad value 1 for "TileLength"
> ERROR 9: Bad tile width/length parameters; copying failed
Here's the problem: you can't use TILED=YES and BLOCKYSIZE=1 together.
> $ gdal_translate -of GTiff -co "TILED=YES" Yotvata.jpg Yotvata1.tif
> Input file size is 8017, 5532
> 0...10...20...30...40...50...60...70...80...90...100 - done.
> Displaying the *tiled* tiff in QGIS takes about 40 seconds.
>
> Now add CRS to the tiff (I know the CRS but headers are lacking):
> $ gdalwarp -s_srs EPSG:2039 -t_srs EPSG:2039 Yotvata1.tif
> Yotvata1_ITM.tif
>
> And now the georeferenced tiff loads in 2 seconds! So the dramatic
> speed improvement was because of CRS data in the file, and not
> tiling.
Wrong. The improvement comes from the fact that gdalwarp too *creates a
stripped TIFF by default*, same as gdal_translate. Whether the TIFF has
a correct *CRS header* or not *is not an issue*.
> Next I tried with TILED=NO :
>
> $ gdal_translate -of GTiff -co "TILED=NO" Yotvata.jpg Yotvata2.tif
> Input file size is 8017, 5532
> 0...10...20...30...40...50...60...70...80...90...100 - done.
>
> and the Yotvata2.tif loads in about 20 seconds. So stripped tiffs do
> seem to display faster.
"TILED=NO" implies a *stripped* TIFF, not *TILED*. I suppose you got the
things mixed at copy/paste, and that should actually be "TILED=YES",
right? Then your comment would make sense.
> I also did gdalwarp on the Yotvata2.tif and again the load time drops
> down to below 2 seconds.
Again, this is becuase gdalwarp *creates a stripped TIFF by default*.
> Now I went back to the pyramid problem, and I see that I can create
> pyramids as expected for both the tiled and stripped tiffs. But
> *only* if there are correct CRS headers in the tiff.
This is not the case for me. I can create pyramids in QGIS for any TIFF,
no matter if it has a CRS header or not.
> So, the bottom line:
>
> 1- Stripped tiffs seem to load and display faster than tiled.
True.
> 2- Tiffs with correct georeference headers display much faster (10X
> improvement).
False.
> 3- Pyramid overviews cannot be created for rasters that don't have
> proper Coordinate Reference System headers
False (For me at least; maybe it is down to your GDAL version - 1.4.4 is
pretty old and there were fixes in the overview creation from that time.
Yet thinking about it I don't see how overviews could have anything to
do with the CRS. Oh well.)
Regards,
Maciek
P.S.
Please post to MLs with using ISO-8859-1 encoding.
--
Maciej Sieczka
www.sieczka.org
More information about the Qgis-user
mailing list