[GRASS5] zlib compression for CELL maps

Markus Neteler neteler at itc.it
Thu Jan 12 02:12:19 EST 2006


On Wed, Jan 04, 2006 at 08:20:12PM +0100, Jaro Hofierka wrote:
> Glynn Clements wrote:
> >Jaro Hofierka wrote:
> >
> >
> >>>>Recently, we tried to import srtm files and floating point maps 
> >>>>took much less disk space then integers :-(
> >>>>I tried to use the GRASS_INT_ZLIB variable, but the compression flag in 
> >>>>a header file is still set to 1 (should be 2?). Problably I missed 
> >>>>something.
> >>>
> >>>
> >>>Did you export it, e.g.:
> >>>
> >>>	GRASS_INT_ZLIB=1
> >>>	export GRASS_INT_ZLIB
> >>>
> >>>or (bash-specific):
> >>>
> >>>	export GRASS_INT_ZLIB=1
> >>>?
> >>
> >>I did it using g.gisenv set="GRASS_INT_ZLIB=1"
> >>Then I checked using g.gisenv get=GRASS_INT_ZLIB.
> >
> >
> >That won't work; GRASS_INT_ZLIB needs to be an environment variable,
> >not a GRASS variable.
> >
> 
> Glynn,
> 
> You're right! Thanks!


Jaro,

the ZLIB compression is broken in GRASS 6.
Please don't use it.

GRASS 6.1.cvs (spearfish60):~ > g.region s=0 n=15 w=0 e=15 res=1
GRASS 6.1.cvs (spearfish60):~ > r.mapcalc mymap=3 ; r.out.ascii mymap
 100%
north: 15
south: 0
east: 15
west: 0
rows: 15
cols: 15
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3

GRASS 6.1.cvs (spearfish60):~ > g.region s=0 n=13 w=0 e=13 res=1
GRASS 6.1.cvs (spearfish60):~ > r.mapcalc mymap=3 ; r.out.ascii mymap
 100%
north: 13
south: 0
east: 13
west: 0
rows: 13
cols: 13
3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3

GRASS 6.1.cvs (spearfish60):~ > g.region s=0 n=11 w=0 e=11 res=1
GRASS 6.1.cvs (spearfish60):~ > r.mapcalc mymap=3 ; r.out.ascii mymap
 100%
north: 11
south: 0
east: 11
west: 0
rows: 11
cols: 11
120 156 99 102 134 3 0 0 209 0 34
120 156 99 102 134 3 0 0 209 0 34
120 156 99 102 134 3 0 0 209 0 34
120 156 99 102 134 3 0 0 209 0 34
120 156 99 102 134 3 0 0 209 0 34
120 156 99 102 134 3 0 0 209 0 34
120 156 99 102 134 3 0 0 209 0 34
120 156 99 102 134 3 0 0 209 0 34
120 156 99 102 134 3 0 0 209 0 34
120 156 99 102 134 3 0 0 209 0 34
120 156 99 102 134 3 0 0 209 0 34

At least small map are not handled correctly.

Markus




More information about the grass-dev mailing list