[Qgis-user] JPeg compression of tiff-file
Andreas Neumann
a.neumann at carto.net
Wed Jan 30 04:20:27 PST 2013
Hi Johan,
There may be two reasons why the opening of the tiff files take so
long:
1. They do not have internal pyramids.
2. Your QGIS version is calculating histograms
You can see if your raster files have pyramids by checking the pyramids
tab in the raster layer properties. If they do not have the pyramids you
will see red cross-marks. You can build or rebuild the pyramids directly
from this tab. Depending on the file-size the process of pyramid
building takes a long time.
As to two: some QGIS versions out there (don't ask me which version
exactly) always calculated histograms on opening the file. If you have
such a version, you should upgrade your QGIS.
If neither of the above are the case the file should open in less than
a second, regardless of the file size.
The recommended compression inside the tiff-file depends on the nature
of the data:
Pure black and white files or files with a handful of colors should not
be jpeg-compressed. A better compression would be deflate or ccittrle or
rle. These are all lossless compressions. JPEG is a lossy compression.
For photo-data or maps with a lot of colors, also for grayscale photos,
JPEG is the better option. You can also set the quality. Be aware though
that JPEG can destroy bits of the data (depending on the quality
setting) - so keep your original data as well.
See http://www.gdal.org/frmt_gtiff.html for more information.
Hope this helps.
Andreas
On Wed, 30 Jan 2013 10:40:45 +0100, Johan Nilsson wrote:
> Thanks.
> Little as I suspected, but even more and that are maybe a way for me
> to find a solution... I have a lot of pure tiff files as black and
> white ortophoto from different years, but when I open the project in
> Qgis is take a long time to 'read in' them. Is there a solution to
> save ortophoto (tiff files) and just load them that are of interest?
> I
> have just add them as raster in a project in Qgis. There tiff-files
> have namne korrensponding to a grid number.
>
> 2013/1/30 Andreas Neumann
>
>> Hi,
>>
>> Geotiff files can have tiles and overviews and georeference
>> information whereas jpeg files cannot to my knowledge. Georeference
>> information for jpeg files are stored in separate jpw files.
>> Besides, due to tiling and overviews tif files can be very large.
>> You could store all orthoimages of your region in a single file
>> without performance problems.
>>
>> Personally I use JPEG compressed tif files for all of my
>> orthoimages. I don't like ECW or MrSid due to the unclear license
>> issues. If you look into the archives of this list you see that
>> people have troubles with these closed formats.
>>
>> Andreas
>>
>> Johan Nilsson schrieb:
>>
>>> Hi.
>>> Maybe little of topic but...
>>> I have found a ortofoto as a Geotiff-file that are compressed with
>>> jpeg. Why kompress tiff with jpeg and not make the hole file as
>>> jpg?
>>>
>>> Cheers
>>>
>>> -------------------------
>>>
>>> Qgis-user mailing list
>>> Qgis-user at lists.osgeo.org [1]
>>> http://lists.osgeo.org/mailman/listinfo/qgis-user [2]
>>
>> --
>> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail
>> gesendet.
>
>
>
> Links:
> ------
> [1] mailto:Qgis-user at lists.osgeo.org
> [2] http://lists.osgeo.org/mailman/listinfo/qgis-user
> [3] mailto:joni8135 at gmail.com
> [4] mailto:a.neumann at carto.net
--
--
Andreas Neumann
Böschacherstrasse 10A
8624 Grüt (Gossau ZH)
Switzerland
More information about the Qgis-user
mailing list