[GRASS-dev] [GRASS GIS] #2349: CELL raster format: make ZLIB level 3 standard compression instead of RLE

GRASS GIS trac at osgeo.org
Sun May 17 05:18:23 PDT 2015


#2349: CELL raster format: make ZLIB level 3 standard compression instead of RLE
--------------------------+-------------------------------------------
  Reporter:  neteler      |      Owner:  grass-dev@…
      Type:  enhancement  |     Status:  new
  Priority:  critical     |  Milestone:  7.1.0
 Component:  Raster       |    Version:  svn-trunk
Resolution:               |   Keywords:  compression, r.compress, null
       CPU:  Unspecified  |   Platform:  All
--------------------------+-------------------------------------------

Comment (by neteler):

 After cleaning up well on that machine, it is now finally working (sorry
 for the delay).

 '''Test 1: mostly no-data cells'''

 {{{
 r.univar eu_dem25_rand100k
 total null and non-null cells: 48000000000
 total null cells: 47999900000
 ...

 r.mapcalc "new_int = round(eu_dem25_rand100k)"

 ls -la grassdata/eu_laea/PERMANENT/cell_misc/new_int:
 total 5.7G
 -rw-r--r-- 1 root root 5.6G May 14 19:03 null
 -rw-r--r-- 1 root root  32M May 16 14:42 null2
 -rw-r--r-- 1 root root    9 May 16 14:42 range
 }}}

 ... that is less than 1% of the original null file size!


 '''Test 2: 54% no-data cells'''

 {{{
 r.univar MOD11A1.A2000101.LST_Day_1km.reconstruct
 total null and non-null cells: 415290645
 total null cells: 226949285

 r.info -g MOD11A1.A2000101.LST_Day_1km.reconstruct | grep datatype
 datatype=CELL

 r.mapcalc "modis_new_int = MOD11A1.A2000101.LST_Day_1km.reconstruct"


 # original:
 ls -la
 grassdata/eu_laea/PERMANENT/cell_misc/MOD11A1.A2000101.LST_Day_1km.reconstruct
 total 50M
 drwxr-xr-x 2 root root 4.0K Apr  8  2014 .
 drwxr-xr-x 6 root root 4.0K May 17 14:14 ..
 -rw-r--r-- 1 root root  50M Apr  8  2014 null
 -rw-r--r-- 1 root root   12 Apr  8  2014 range

 # new compressed null2:
 ls -la grassdata/eu_laea/PERMANENT/cell_misc/modis_new_int
 total 1.6M
 drwxr-xr-x 2 root root 4.0K May 17 14:14 .
 drwxr-xr-x 6 root root 4.0K May 17 14:14 ..
 -rw-r--r-- 1 root root 1.6M May 17 14:14 null2
 -rw-r--r-- 1 root root   12 May 17 14:14 range
 }}}

 ... that is 3% of the original null file size.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2349#comment:23>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list