[GRASS-dev] GRASS_COMPRESSOR=BZIP2 in winGRASS

Helmut Kudrnovsky hellik at web.de
Mon Sep 19 12:49:46 PDT 2016


Helmut Kudrnovsky wrote
> Hi,
> 
>>2016-09-18 20:04 GMT+02:00 Markus Neteler <

> neteler@

> >:
>>>> "GRASS needs to be compiled with BZIP2 for BZIP2 compression"
>>>> ?
>>>
>>> I checked
>>> https://wingrass.fsv.cvut.cz/grass73/x86_64/logs/log-r69510-8/
>>> BZIP2 support: no
>>>
>>> That's why it is at time not included in winGRASS...
>>
>>bzlib2 support activated in trunk (r69517). Let's check the next
>>WinGRASS build. Martin
> 
> tested with today's winGRASS daily:
> ---
> echo %GRASS_COMPRESSOR%
> BZIP2
> 
> r.mapcalc expression=checkcompression = elevation at PERMANENT / 2
> 
> r.compress -p map=checkcompression at checkbzip2                                   
> <checkcompression>
>  is compressed (method 4: BZIP2). Data type: FCELL
> ---
> 
> thanks for activating BZIP2 compression.

some tests with different compressors:

r.info map=CHELSA_bio01 at chelsa_bioclim                                          

+----------------------------------------------------------------------------+
 | Map:      CHELSA_bio01 at chelsa_bioclim    Date: Mon Sep 19 21:21:59 2016   
|
 | Mapset:   chelsa_bioclim                 Login of Creator: hkmyr          
|
 | Location: loc_epsg4326                                                    
|
 | DataBase: D:\grassdata                                                    
|
 | Title:    CHELSA_bio01                                                    
|
 | Timestamp: none                                                           
|

|----------------------------------------------------------------------------|
 |                                                                           
|
 |   Type of Map:  raster               Number of Categories: 0              
|
 |   Data Type:    FCELL                                                     
|
 |   Rows:         4920                                                      
|
 |   Columns:      8160                                                      
|
 |   Total Cells:  40147200                                                  
|
 |        Projection: Längen- und Breitengrad                                
|
 |            N:        73N    S:        32N   Res: 0:00:30                  
|
 |            E:        54E    W:        14W   Res: 0:00:30                  
|
 |   Range of data:    min = -16.2343  max = 26.04194                        
|
 |                                                                           
|
 |   Data Description:                                                       
|
 |    generated by r.in.gdal                                                 
|
 |                                                                           
|
 |   Comments:                                                               
|
 |    r.in.gdal -k input="D:\gis_data_climate\chelsa\CHELSA_bio01_1979-201\  
|
 |    3_V1_1_eur.tif" output="CHELSA_bio01" memory=300 offset=0 num_digits=0 
|
 |                                                                           
|

+----------------------------------------------------------------------------+
 
 r.info map=CHELSA_bio02 at chelsa_bioclim                                          

+----------------------------------------------------------------------------+
 | Map:      CHELSA_bio02 at chelsa_bioclim    Date: Mon Sep 19 21:22:17 2016   
|
 | Mapset:   chelsa_bioclim                 Login of Creator: hkmyr          
|
 | Location: loc_epsg4326                                                    
|
 | DataBase: D:\grassdata                                                    
|
 | Title:    CHELSA_bio02                                                    
|
 | Timestamp: none                                                           
|

|----------------------------------------------------------------------------|
 |                                                                           
|
 |   Type of Map:  raster               Number of Categories: 0              
|
 |   Data Type:    FCELL                                                     
|
 |   Rows:         4920                                                      
|
 |   Columns:      8160                                                      
|
 |   Total Cells:  40147200                                                  
|
 |        Projection: Längen- und Breitengrad                                
|
 |            N:        73N    S:        32N   Res: 0:00:30                  
|
 |            E:        54E    W:        14W   Res: 0:00:30                  
|
 |   Range of data:    min = 6.353987  max = 27.25062                        
|
 |                                                                           
|
 |   Data Description:                                                       
|
 |    generated by r.in.gdal                                                 
|
 |                                                                           
|
 |   Comments:                                                               
|
 |    r.in.gdal -k input="D:\gis_data_climate\chelsa\CHELSA_bio02_1979-201\  
|
 |    3_V1_1_eur.tif" output="CHELSA_bio02" memory=300 offset=0 num_digits=0 
|
 |                                                                           
|

+----------------------------------------------------------------------------+
 
 r.info map=CHELSA_bio03 at chelsa_bioclim                                          

+----------------------------------------------------------------------------+
 | Map:      CHELSA_bio03 at chelsa_bioclim    Date: Mon Sep 19 21:22:35 2016   
|
 | Mapset:   chelsa_bioclim                 Login of Creator: hkmyr          
|
 | Location: loc_epsg4326                                                    
|
 | DataBase: D:\grassdata                                                    
|
 | Title:    CHELSA_bio03                                                    
|
 | Timestamp: none                                                           
|

|----------------------------------------------------------------------------|
 |                                                                           
|
 |   Type of Map:  raster               Number of Categories: 0              
|
 |   Data Type:    FCELL                                                     
|
 |   Rows:         4920                                                      
|
 |   Columns:      8160                                                      
|
 |   Total Cells:  40147200                                                  
|
 |        Projection: Längen- und Breitengrad                                
|
 |            N:        73N    S:        32N   Res: 0:00:30                  
|
 |            E:        54E    W:        14W   Res: 0:00:30                  
|
 |   Range of data:    min = 31.54294  max = 62.04853                        
|
 |                                                                           
|
 |   Data Description:                                                       
|
 |    generated by r.in.gdal                                                 
|
 |                                                                           
|
 |   Comments:                                                               
|
 |    r.in.gdal -k input="D:\gis_data_climate\chelsa\CHELSA_bio03_1979-201\  
|
 |    3_V1_1_eur.tif" output="CHELSA_bio03" memory=300 offset=0 num_digits=0 
|
 |                                                                           
|

+----------------------------------------------------------------------------+
 
 r.info map=CHELSA_bio04 at chelsa_bioclim                                          

+----------------------------------------------------------------------------+
 | Map:      CHELSA_bio04 at chelsa_bioclim    Date: Mon Sep 19 21:22:54 2016   
|
 | Mapset:   chelsa_bioclim                 Login of Creator: hkmyr          
|
 | Location: loc_epsg4326                                                    
|
 | DataBase: D:\grassdata                                                    
|
 | Title:    CHELSA_bio04                                                    
|
 | Timestamp: none                                                           
|

|----------------------------------------------------------------------------|
 |                                                                           
|
 |   Type of Map:  raster               Number of Categories: 0              
|
 |   Data Type:    FCELL                                                     
|
 |   Rows:         4920                                                      
|
 |   Columns:      8160                                                      
|
 |   Total Cells:  40147200                                                  
|
 |        Projection: Längen- und Breitengrad                                
|
 |            N:        73N    S:        32N   Res: 0:00:30                  
|
 |            E:        54E    W:        14W   Res: 0:00:30                  
|
 |   Range of data:    min = 216.0067  max = 1312.274                        
|
 |                                                                           
|
 |   Data Description:                                                       
|
 |    generated by r.in.gdal                                                 
|
 |                                                                           
|
 |   Comments:                                                               
|
 |    r.in.gdal -k input="D:\gis_data_climate\chelsa\CHELSA_bio04_1979-201\  
|
 |    3_V1_1_eur.tif" output="CHELSA_bio04" memory=300 offset=0 num_digits=0 
|
 |                                                                           
|

+----------------------------------------------------------------------------+

---------
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

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).



-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GRASS-COMPRESSOR-BZIP2-in-winGRASS-tp5286534p5286738.html
Sent from the Grass - Dev mailing list archive at Nabble.com.


More information about the grass-dev mailing list