On Mon, Sep 19, 2016 at 9:49 PM, Helmut Kudrnovsky <hel...@web.de> wrote:
[...]
>
> ---------
> original geotif with gdal_translate -co COMPRESS=LZW -co PREDICTOR=2
>
> ls -l
> total 279600
> -rw-r--r-- 1 88170601 Sep 19 19:07 CHELSA_bio01_1979-2013_V1_1_eur.tif
> -rw-r--r-- 1 56511749 Sep 19 19:13 CHELSA_bio02_1979-2013_V1_1_eur.tif
> -rw-r--r-- 1 69376203 Sep 19 19:16 CHELSA_bio03_1979-2013_V1_1_eur.tif
> -rw-r--r-- 1 72247104 Sep 19 19:19 CHELSA_bio04_1979-2013_V1_1_eur.tif
>
> ---------
> r.in.gdal and GRASS_COMPRESSOR=ZLIB
>
> ls -l
> total 305909
> -rw-r--r-- 1 82287638 Sep 19 19:28 CHELSA_bio01_zlib
> -rw-r--r-- 1 77139587 Sep 19 19:28 CHELSA_bio02_zlib
> -rw-r--r-- 1 74791532 Sep 19 19:28 CHELSA_bio03_zlib
> -rw-r--r-- 1 79030011 Sep 19 19:28 CHELSA_bio04_zlib
>
> ---------
> r.in.gdal and GRASS_COMPRESSOR=BZIP2 and GRASS_INT_ZLIB=9

Note that GRASS_INT_ZLIB affects only ZLIB compression.

>
> ls -l
> total 311983
> -rw-r--r-- 1 84163200 Sep 19 19:21 CHELSA_bio01
> -rw-r--r-- 1 78882189 Sep 19 19:22 CHELSA_bio02
> -rw-r--r-- 1 74892325 Sep 19 19:22 CHELSA_bio03
> -rw-r--r-- 1 81530621 Sep 19 19:22 CHELSA_bio04
>
> -----------
>
> at least in this case of data, r.external to  '-co COMPRESS=LZW -co
> PREDICTOR=2' geotiffs saves more disk space than import (regardless of the
> GRASS_COMPRESSOR).

If you want to save a lot of disk space, you can convert FCELL maps to
CELL maps, e.g. for temperature values rounding to Celsius * 10, then
check again which compressor best fits your needs. In previous tests I
found that BZIP2 only gives me a disk space advantage for large maps
with >10000 columns. Also, it seems that BZIP2 might compress integer
maps better than fp maps.

Markus M
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to