<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=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:0 0 0 0 0 0 0 0 0 0;}
@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:Aptos;
panose-1:2 11 0 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
span.EmailStyle20
{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:8.5in 11.0in;
margin:70.85pt 56.7pt 70.85pt 56.7pt;}
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=EN-US link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>It’s a COG so it just decompresses and reads the tiles/cells needed for reprojection<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>-- <o:p></o:p></p></div><div><p class=MsoNormal>Michael Smith<o:p></o:p></p><p class=MsoNormal>Remote Sensing/GIS Center<o:p></o:p></p><p class=MsoNormal>US Army Corps of Engineers<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span lang=FI style='font-size:12.0pt;color:black'>From: </span></b><span lang=FI style='font-size:12.0pt;color:black'>PROJ <proj-bounces@lists.osgeo.org> on behalf of Rahkonen Jukka via PROJ <proj@lists.osgeo.org><br><b>Reply-To: </b>Rahkonen Jukka <jukka.rahkonen@maanmittauslaitos.fi><br><b>Date: </b>Sunday, December 22, 2024 at 3:12 PM<br><b>To: </b>Howard Butler <howard@hobu.co>, Even Rouault <even.rouault@spatialys.com><br><b>Cc: </b>gdal dev <gdal-dev@lists.osgeo.org>, proj <proj@lists.osgeo.org><br><b>Subject: </b>Re: [PROJ] [gdal-dev] LIBERTIFF / Thread-safe TIFF reader<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=FI style='font-size:12.0pt;font-family:"Aptos",sans-serif'><o:p> </o:p></span></p></div><p class=MsoNormal><span lang=FI>Hi,<o:p></o:p></span></p><p class=MsoNormal><span lang=FI><o:p> </o:p></span></p><p class=MsoNormal style='margin-bottom:12.0pt'>The total size of the .tif files in my PROJ_DATA is 959 MB. I tried the LERC compression with MAX_Z_ERROR values 0.001 and 0.01<o:p></o:p></p><p class=MsoNormal>for /f %i in ('dir /b *.tif') do (gdal_translate -of GTiff -co compress=lerc -co max_z_error=0.001 %i %i.lerc.tif)<br><br>z_error 0.001: 682 MB (-29%)<o:p></o:p></p><p class=MsoNormal>z_error 0.01: 549 MB (-43%)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The savings in space are real (though I think I could save 98 percent of space be deleting the grids which I never use). When it comes to compression/decompression, I think that a proper test where Proj is used for doing something real would be needed. Does Proj decompress the whole grid file, or just the tiles that it needs? How much time is used for opening the file and finding the tiles?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>-Jukka Rahkonen-<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span lang=FI>Lähettäjä:</span></b><span lang=FI> gdal-dev <gdal-dev-bounces@lists.osgeo.org> <b>Puolesta </b>Howard Butler via gdal-dev<br><b>Lähetetty:</b> sunnuntai 22. joulukuuta 2024 16.39<br><b>Vastaanottaja:</b> Even Rouault <even.rouault@spatialys.com><br><b>Kopio:</b> gdal dev <gdal-dev@lists.osgeo.org>; proj <proj@lists.osgeo.org><br><b>Aihe:</b> Re: [gdal-dev] [PROJ] LIBERTIFF / Thread-safe TIFF reader<o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=FI><o:p> </o:p></span></p><p class=MsoNormal><span lang=FI><o:p> </o:p></span></p><div><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=FI><o:p> </o:p></span></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal><span lang=FI>On Dec 20, 2024, at 4:56 PM, Even Rouault via gdal-dev <<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>> wrote:<o:p></o:p></span></p></div><p class=MsoNormal><span lang=FI><o:p> </o:p></span></p><div><p class=MsoNormal><span lang=FI style='font-size:13.5pt;font-family:Helvetica'>Besides reprocessing all of our existing grids,</span><span lang=FI><a href="https://github.com/geotiffjs/geotiff.js/tree/master/src/compression"><span style='font-size:13.5pt;font-family:Helvetica'>https://github.com/geotiffjs/geotiff.js/tree/master/src/compression</span></a></span><span class=apple-converted-space><span lang=FI style='font-size:13.5pt;font-family:Helvetica'> </span></span><span lang=FI style='font-size:13.5pt;font-family:Helvetica'>seems to show that it doesn't support ZSTD, which would break at least our wonderful<span class=apple-converted-space> </span></span><span lang=FI><a href="http://cdn.proj.org/"><span style='font-size:13.5pt;font-family:Helvetica'>cdn.proj.org</span></a></span><span lang=FI style='font-size:13.5pt;font-family:Helvetica'>interactive map</span><span lang=FI><o:p></o:p></span></p></div></blockquote></div><p class=MsoNormal><span lang=FI><o:p> </o:p></span></p><div><p class=MsoNormal><span lang=FI>To throw a wrench into it... <o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=FI><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=FI>geotiff.js has LERC support. Floating point LERC TIFFs compressed with a MAX_Z_ERROR to one decimal better than the *stated precision* of the grids would be smaller and more efficiently compressed/decompressed. By maybe a 1/3rd over zstd and deflate.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=FI><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=FI>See this great write-up by LINZ about the topic <a href="https://github.com/linz/elevation/tree/master/docs/tiff-compression">https://github.com/linz/elevation/tree/master/docs/tiff-compression</a> <o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=FI><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=FI>Howard<o:p></o:p></span></p></div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Aptos",sans-serif'>_______________________________________________ PROJ mailing list PROJ@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/proj <o:p></o:p></span></p></div></body></html>