<div dir="ltr"><div><div><div><div>Hi,<br><br>since my local drive was filled up again :) I checked raster how data are currently compressed in GRASS GIS 7.2.svn.<br>According to<br><br><a href="https://grass.osgeo.org/grass72/manuals/r.compress.html#used-compression-algorithms">https://grass.osgeo.org/grass72/manuals/r.compress.html#used-compression-algorithms</a><br><br>all maps are DEFLATE compressed by default:<br><br>"Raster maps are by default ZLIB compressed.<br>...<br><br>Floating point (FCELL, DCELL) raster maps never use RLE compression; they are either compressed with ZLIB, LZ4, BZIP2 or are uncompressed.<br>"<br><br>Ehm, now how *are* FCELL, DCELL compressed by default? Not quite clear to me! This document needs improvements.<br><br>Reality check with Sentinel-2 data (3 different bands, same regional extent):<br><br><span style="font-family:monospace,monospace">GRASS 7.2.svn (utm37n):~ > <a href="http://r.info">r.info</a> -r s2_20151225_B02_10m<br>min=0<br>max=22937<br>GRASS 7.2.svn (utm37n):~ > <a href="http://r.info">r.info</a> -r s2_20151225_B04_10m<br>min=0<br>max=18849<br>GRASS 7.2.svn (utm37n):~ > <a href="http://r.info">r.info</a> -r s2_20151225_B8A_20m<br>min=0<br>max=17210<br><br>GRASS 7.2.svn (utm37n):~ >:~ > r.compress s2_20151225_B02_10m -p<br><s2_20151225_B02_10m> is compressed (method 2: ZLIB). Data type:<br>CELL<br><br>GRASS 7.2.svn (utm37n):~ >:~ > r.compress s2_20151225_B04_10m -p<br><s2_20151225_B04_10m> is compressed (method 2: ZLIB). Data type:<br>CELL<br><br>GRASS 7.2.svn (utm37n):~ >:~ > r.compress s2_20151225_B8A_20m -p<br><s2_20151225_B8A_20m> is compressed (method 2: ZLIB). Data type:<br>CELL<br></span><br>So far so nice. Now the suprising part, while the channels are not identical (obviously, since covering different spectral parts), the map sizes are identical!<br><br><span style="font-family:monospace,monospace">GRASS 7.2.svn (utm37n):~ > ls -la<br>...<br>-rw-r--r--  1 neteler neteler 2539235691 Jun 14 17:14 s2_20151225_B02_10m<br>-rw-r--r--  1 neteler neteler 2539235691 Jun 14 17:19 s2_20151225_B03_10m<br>-rw-r--r--  1 neteler neteler 2539235691 Jun 14 17:25 s2_20151225_B04_10m<br>-rw-r--r--  1 neteler neteler  634878630 Jun 14 20:36 s2_20151225_B05_20m<br>-rw-r--r--  1 neteler neteler  634878630 Jun 14 20:37 s2_20151225_B06_20m<br>-rw-r--r--  1 neteler neteler  634878630 Jun 14 20:39 s2_20151225_B07_20m<br>-rw-r--r--  1 neteler neteler  634878630 Jun 14 20:40 s2_20151225_B11_20m<br>-rw-r--r--  1 neteler neteler  634878630 Jun 14 20:42 s2_20151225_B12_20m<br>-rw-r--r--  1 neteler neteler  634878630 Jun 14 20:43 s2_20151225_B8A_20m</span><br><br></div></div>I would expect different sizes, compression can hardly lead to identical file sizes.<br><br></div><div>Next test: gzip the file<br><span style="font-family:monospace,monospace"><br>GRASS 7.2.svn (utm37n):~/grassdata/utm37n/PERMANENT/cell > ls -la s2_20151225_B03_10m<br>-rw-r--r-- 1 mneteler mneteler 2539235691 Jun 14 17:19 s2_20151225_B03_10m<br><br>GRASS 7.2.svn (utm37n):~/grassdata/utm37n/PERMANENT/cell > gzip s2_20151225_B03_10m<br><br>GRASS 7.2.svn (utm37n):~/grassdata/utm37n/PERMANENT/cell > ls -la s2_20151225_B03_10m.gz <br>-rw-r--r-- 1 mneteler mneteler 1456248453 Jun 14 17:19 s2_20151225_B03_10m.gz<br><br></span></div><div><span style="font-family:monospace,monospace">R<br>> 1456248453/2539235691<br>[1] 0.5734987<br></span></div><div><br></div><div>Quite smaller! So I am not at all convinced that these CELL files are currently <span style="font-family:monospace,monospace">ZLIB compressed.<br></span></div><div><br></div><div>From this ticket I would expect something else:<br><a href="https://trac.osgeo.org/grass/ticket/2349">https://trac.osgeo.org/grass/ticket/2349</a><br></div><div><br></div><div>Ah, and no specific environment variables are set:<br><br><span style="font-family:monospace,monospace">GRASS 7.2.svn (utm37n):~ > echo $GRASS_<tab><br>$GRASS_ADDON_BASE   $GRASS_GNUPLOT    $GRASS_HTML_BROWSER  $GRASS_PAGER<br>$GRASS_PROJSHARE    $GRASS_PYTHON     $GRASS_VERSION</span><br><br></div><div><br></div>A bug? <br><br></div>Markus<br></div>