<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Vain tekstin\00E4 Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Seliteteksti Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.VaintekstinChar
        {mso-style-name:"Vain tekstin\00E4 Char";
        mso-style-priority:99;
        mso-style-link:"Vain tekstin\00E4";
        font-family:Consolas;}
span.SelitetekstiChar
        {mso-style-name:"Seliteteksti Char";
        mso-style-priority:99;
        mso-style-link:Seliteteksti;
        font-family:"Tahoma","sans-serif";}
span.Shkpostityyli21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
p.NurText, li.NurText, div.NurText
        {mso-style-name:"Nur Text";
        mso-style-link:"Nur Text Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.NurTextZchn
        {mso-style-name:"Nur Text Zchn";
        mso-style-priority:99;
        mso-style-link:"Nur Text";
        font-family:Consolas;}
p.Sprechblasentext, li.Sprechblasentext, div.Sprechblasentext
        {mso-style-name:Sprechblasentext;
        mso-style-link:"Sprechblasentext Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.SprechblasentextZchn
        {mso-style-name:"Sprechblasentext Zchn";
        mso-style-priority:99;
        mso-style-link:Sprechblasentext;
        font-family:"Tahoma","sans-serif";}
span.Shkpostityyli26
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">See the comments on
<a href="http://hub.qgis.org/issues/10563">http://hub.qgis.org/issues/10563</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">I recommend you to estimate how the scale 1:25000 turns into pixel size.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">I was remembering that screen resolution is about 91 pixels per inch but let’s check it.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Screen dot size=0.28 mm<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">One inch is 25.4 mm = 2.54 cm = 0.0254 m<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">25.4/0.28 = 90.71<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Let’s assume that the native resolution of your images is 1 m. One inch on screen takes 90.71 meters of your data so the scale is
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">90.71/0.0254 = 3582.7<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Overview level 2 (2 m pixel size) would correspond to  screen scale 1:7165<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">level 4 (4 m) to scale 1:14330<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">level 8 (8 m) to scale 1:28661.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Internal overviews can be used with tiff format.  Overviews will be stored inside the master tiff file which is handy because the one single file contains all, both the native data and all the overviews.
 It is also using  a bit less disk space than if overviews are written into external file. External overviews in .ovr format are tiff files with the same base name than the source layer and with extension .ovr. External overviews in Erdas format are fundamentally
 same but stored in Erdas Imagine format, not tiff. As far as I know the speed with GDAL programs is the same but I can Imagine that Erdas Imagine would like its own format better. Because you have a virtual raster as master layer you can’t use internal overviews.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">I would say that you can feed the numbers into a spreadsheet if you want to play and understand how it goes, but it is not at all necessary. If you think that using 25% extra disk space for level
 2 overview is too much, start from level 4, it is certainly worth the 6.25% that it costs.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">If you are happy with your virtual raster collecting 875 jpegs then good. However, jpegs and pngs are the worst alternatives of all for this kind of usage because the whole file must be decompressed
 even if only a small part of it will be needed. Convert them into tiled geotiffs which are internally compressed with jpeg compression and you will be much more happy. Of course if you enjoy speed, which I do not know.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">GDAL takes automatically the resolution that is closest best to the asked output resolution. If you ask 10 m pixel size for the output, it does not start from 1, 2, nor 4 meter resolution which would
 be waste of resources. Instead it takes the 8 m version and resamples it into 10 m pixel size. GDAL does not take 16 m version because by doing that the quality would be unnecessary bad. Makes sense, doesn’t?  How to control, I don’t know. Probably in the
 code but of course by deleting the overviews you can force GDAL to start from the native resolution.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Here are the basic commands to use if you have 3-band aerial images. For raster maps LZW of DEFLATE compression may suit better.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">gdal_translate -of gtiff -co tiled=yes -co compress=jpeg -co photometric=ycbcr input.tif output.tif<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">gdaladdo -ro --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW output.tif 2 4 8 16 32 64<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Julian Schall wrote:<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoPlainText"><span lang="EN-US">Dear Jukka,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">thank you for your answer.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">I still don’t know how to build pyramids just for defined scale ranges (in my case: smaller then 1:25.000).<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">I’ve forgotten to tell you an –maybe important- detail: I’m working with a virtual raster catalogue which i built out of 875 .jpgs (4000x4000).<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">When building pyramids, i’ve always used the option “external (Erdas Image.aux)”.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Can you shortly explain the difference between the 3 options (external .ovr, internal, external .aux)?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">I couldn’t find an advice in the handbook or via google.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">The QGIS instructions say that after building pyramids QGIS automaticly takes the best resolution when loading raster layers. So how can I influence what resolution QGIS chooses?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><br>
Thanks again for further help!<br>
<br>
Kind regards,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><br>
Julian Schall<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Date: Thu, 12 Jun 2014 09:34:18 +0000 (UTC)<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">From: Jukka Rahkonen <</span><span lang="DE"><a href="mailto:jukka.rahkonen@mmmtike.fi"><span lang="EN-US">jukka.rahkonen@mmmtike.fi</span></a></span><span lang="EN-US">><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">To: </span><span lang="DE"><a href="mailto:qgis-user@lists.osgeo.org"><span lang="EN-US">qgis-user@lists.osgeo.org</span></a></span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Subject: Re: [Qgis-user] QGIS: Reduction of resolution via pyramids<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">      only for    defined scale range<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Message-ID: <</span><span lang="DE"><a href="mailto:loom.20140612T112229-91@post.gmane.org"><span lang="EN-US">loom.20140612T112229-91@post.gmane.org</span></a></span><span lang="EN-US">><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Content-Type: text/plain; charset=utf-8<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Julian Schall <</span><span lang="DE"><a href="mailto:j.schall@..."><span lang="EN-US">j.schall@...</span></a></span><span lang="EN-US">> writes:<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> Hello members of the mailing list, <o:p>
</o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> ?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> I would appreciate help on the following problem:
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> I would like to improve the performance of a raster layer. Of course I can<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">build pyramids for that purpose. But in the scale ranges from 1:1 to<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">1:25.000 I need maximum resolution and detail. In this scale range, the<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">performance is sufficient even without pyramids.
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> Ideal would be that the pyramids respectively the reduction of the<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">resolution with improvement of performance is only applied to scales smaller<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">than 1:25,000. Is this possible in QGIS?
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> ?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> Thanks for helpful answers! <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> ?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> Kind regards <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="DE">> ?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> Julian Schall<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">There are check boxes for overview levels in the Build overviews panel.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Level 2 means double the original pizel size etc. Leave for example levels 2<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">and 4 unchecked. However, level 2 means 25% extra disk space but level 4<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">only 6.25%. Thus it may not make sense to skip other levels than 2. Remember<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">to compress also the overviews and test with external overviews which you<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">can easily delete and continue with new tests. Internal overviews can be<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">removed so that they are no more used but operation does not make image<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">files smaller.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">------------------------------<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">_______________________________________________<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Qgis-user mailing list<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="DE"><a href="mailto:Qgis-user@lists.osgeo.org"><span lang="EN-US">Qgis-user@lists.osgeo.org</span></a></span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="DE"><a href="http://lists.osgeo.org/mailman/listinfo/qgis-user"><span lang="EN-US">http://lists.osgeo.org/mailman/listinfo/qgis-user</span></a></span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</div>
</body>
</html>