<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=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 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;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML-esimuotoiltu Char";
        margin:0cm;
        font-size:10.0pt;
        font-family:"Courier New";
        mso-fareast-language:FI;}
span.HTML-esimuotoiltuChar
        {mso-style-name:"HTML-esimuotoiltu Char";
        mso-style-priority:99;
        mso-style-link:HTML-esimuotoiltu;
        font-family:Consolas;
        mso-fareast-language:EN-US;}
span.Shkpostityyli22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 70.85pt 2.0cm;}
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="#0563C1" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">Great, I just found 21000 .msk files without overviews from my computer. My scanned map files are so small that I have not noticed that they are unnecessary slow to view. Only trying someone else’s data with 70000 by
 80000 pixels draw my attention.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">-Jukka-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="mso-fareast-language:FI">Lähettäjä:</span></b><span style="mso-fareast-language:FI"> Even Rouault <even.rouault@spatialys.com>
<br>
<b>Lähetetty:</b> keskiviikko 3. huhtikuuta 2024 17.18<br>
<b>Vastaanottaja:</b> Rahkonen Jukka <jukka.rahkonen@maanmittauslaitos.fi>; 'gdal-dev@lists.osgeo.org' (gdal-dev@lists.osgeo.org) <gdal-dev@lists.osgeo.org><br>
<b>Aihe:</b> Re: [gdal-dev] Gdaladdo and external mask band<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p>Hi Jukka,<span style="mso-fareast-language:FI"><o:p></o:p></span></p>
<p>I've realized this behaviour was actually documented in <a href="https://gdal.org/drivers/raster/gtiff.html#overviews-and-nodata-masks">
https://gdal.org/drivers/raster/gtiff.html#overviews-and-nodata-masks</a> : "Internal overviews, external nodata mask: when running BuildOverviews() in update mode on the .tif file, only the overviews of the main bands will be generated. Overviews of the external
 .msk file must be explicitly generated by running BuildOverviews() on the .msk."<o:p></o:p></p>
<p>... but just after fixing it in <a href="https://github.com/OSGeo/gdal/pull/9603">
https://github.com/OSGeo/gdal/pull/9603</a> to do the expected thing: that is build overviews of the main bands and of the .msk<o:p></o:p></p>
<p>I think it is also high time to reconsider switching the default value of GDAL_TIFF_INTERNAL_MASK to YES :
<a href="https://github.com/OSGeo/gdal/pull/9604">https://github.com/OSGeo/gdal/pull/9604</a><o:p></o:p></p>
<p>Even<o:p></o:p></p>
<div>
<p class="MsoNormal">Le 03/04/2024 à 10:56, Rahkonen Jukka via gdal-dev a écrit :<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">I was making some tests with filegdb raster from
</span><a href="https://www.fs.usda.gov/detail/r5/communityforests/?cid=fseprd1009698"><span lang="EN-US">Region 5 - State (usda.gov)</span></a><span lang="EN-US">, file
<a href="https://usfs-public.box.com/shared/static/q96eev9gnsa9hw5bwpmwpmxerbdat0vi.zip">
https://usfs-public.box.com/shared/static/q96eev9gnsa9hw5bwpmwpmxerbdat0vi.zip</a><br>
I converted the data into GeoTIFF, added overviews, and noticed, that the GeoTIFF is very slow to browse with QGIS at small scales. I noticed that it is because gdal_translate creates an external .msk mask band, and gdaladdo does not create overviews for the
 mask.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Is is somehow possible to create overviews for the .msk mask either automatically or manually? Or would it create a bad mask that would not match with the corresponding overviews of the data bands?</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">-Jukka Rahkonen-</span><o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:FI"><br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>gdal-dev mailing list<o:p></o:p></pre>
<pre><a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><o:p></o:p></pre>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre><a href="http://www.spatialys.com/">http://www.spatialys.com</a><o:p></o:p></pre>
<pre>My software is free, but my time generally not.<o:p></o:p></pre>
</div>
</body>
</html>