[gdal-dev] Gdaladdo and external mask band

Rahkonen Jukka jukka.rahkonen at maanmittauslaitos.fi
Wed Apr 3 07:48:42 PDT 2024


Hi,

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.

-Jukka-

Lähettäjä: Even Rouault <even.rouault at spatialys.com>
Lähetetty: keskiviikko 3. huhtikuuta 2024 17.18
Vastaanottaja: Rahkonen Jukka <jukka.rahkonen at maanmittauslaitos.fi>; 'gdal-dev at lists.osgeo.org' (gdal-dev at lists.osgeo.org) <gdal-dev at lists.osgeo.org>
Aihe: Re: [gdal-dev] Gdaladdo and external mask band


Hi Jukka,

I've realized this behaviour was actually documented in https://gdal.org/drivers/raster/gtiff.html#overviews-and-nodata-masks : "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."

... but just after fixing it in https://github.com/OSGeo/gdal/pull/9603 to do the expected thing: that is build overviews of the main bands and of the .msk

I think it is also high time to reconsider switching the default value of GDAL_TIFF_INTERNAL_MASK to YES : https://github.com/OSGeo/gdal/pull/9604

Even
Le 03/04/2024 à 10:56, Rahkonen Jukka via gdal-dev a écrit :
Hi,

I was making some tests with filegdb raster from Region 5 - State (usda.gov)<https://www.fs.usda.gov/detail/r5/communityforests/?cid=fseprd1009698>, file https://usfs-public.box.com/shared/static/q96eev9gnsa9hw5bwpmwpmxerbdat0vi.zip
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.
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?

-Jukka Rahkonen-



_______________________________________________

gdal-dev mailing list

gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>

https://lists.osgeo.org/mailman/listinfo/gdal-dev

--

http://www.spatialys.com<http://www.spatialys.com/>

My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240403/f25c8f33/attachment-0001.htm>


More information about the gdal-dev mailing list