[GRASS5] r.in.gdal and compression
Markus Neteler
neteler at itc.it
Wed Mar 24 08:57:13 EST 2004
Hi,
to enable compression for GDT_Byte/CELL_TYPE, I have made
following change:
grass/src/raster/r.in.gdal/main.c,v
retrieving revision 1.34
diff -u -r1.34 main.c
--- main.c 19 Mar 2004 11:29:46 -0000 1.34
+++ main.c 24 Mar 2004 13:47:12 -0000
@@ -614,7 +614,7 @@
eGDT = GDT_Int32;
complex = FALSE;
G_set_cell_format(0);
- raster_open_new_func = G_open_raster_new_uncompressed;
+ /* raster_open_new_func = G_open_raster_new_uncompressed;*/ /* ?? */
break;
Results:
- original file (1.6MB)
1629790 Mar 24 14:36 g1b05901.tif
- r.in.gdal old behaviour (37MB):
ls -artl ~/grassdata/pat/neteler/cell | tail -2
37307088 Mar 24 14:42 menegom
- r.in.gdal new behaviour (7.3MB):
ls -1 ~/grassdata/pat/neteler/cell | tail -1
7334903 Mar 24 14:44 menegom
Even 7.3 MB are not exciting, but due to the RLE compression
used in GRASS (instead of deflate).
The same change (I guess) is necessary for
case GDT_Int16:
case GDT_UInt16:
data_type = CELL_TYPE;
?!
Any foreseeable problems with that?
I don't understand why 'G_open_raster_new_uncompressed' was used.
Markus
More information about the grass-dev
mailing list