[GRASS5] Compression (?) of CELL maps (int)

Glynn Clements glynn.clements at virgin.net
Thu Jun 5 17:20:58 EDT 2003

Markus Neteler wrote:

> Question: Are CELL maps compressed?

G_open_cell_new() and G_open_raster_new(..., CELL_TYPE) create a
compressed map; but ...

> If yes, the compression
> rate seems to me much lower than for FCELL.

FCELL/DCELL data is zlib (gzip) compressed; CELL is RLE-compressed,
which is much less effective.

> GRASS:/ssi-data/grass/PERMANENT/cell > l
> -rw-r--r-- 1 grass fepssi 78518805 Jun  5 15:42 060150.g.s9_SA_135.int
> GRASS:/ssi-data/grass/PERMANENT/cell > gzip 060150.g.s9_SA_135.int
> GRASS:/ssi-data/grass/PERMANENT/cell > l
> -rw-r--r-- 1 grass fepssi 49847399 Jun  5 15:42 060150.g.s9_SA_135.int.gz
> -> 63 %
> Can we somehow improve the situation?

Use zlib for CELL maps. But that means messing with the core raster
I/O functions.

FWIW, I intend to completely re-write the raster I/O code once I move
to 5.1. The existing code isn't particularly legible; two significant
bugs which were introduced with the addition of FP and NULL support
managed to remain undetected until after 5.0.0 was released.

Also, there appear to be significant performance issues with that
code; the limiting factor ought to be the raw disk I/O rate, but that
doesn't appear to be the case at present.

Glynn Clements <glynn.clements at virgin.net>

More information about the grass-dev mailing list