[GRASS5] Removing LZW

Eric G . Miller egm2 at jps.net
Tue Nov 28 00:35:34 EST 2000


Well nobody seems interested, so I've uploaded versions of get_row.c and
put_row.c that *can* use the new G_zlib_*() compression routines in
flate.c.  By default, they still use the G_lzw_*() compression routines.

If anyone wants to help me test these routines, you should follow these
instructions.

1) DO NOT test on data you aren't willing to have destroyed!  If the
routines screw up, there may be no way to recover your data.

2) These routines only affect compressed floating point rasters.  Such
rasters will have to be in a format readable after recompilation (see
below).
  
  a)  For the data set you are willing to sacrifice, run the r.compress
     command on it, with the '-u' flag, using a version of GRASS that
     still uses LZW compression.
     
     or
     
  b) I have written a utility called r.lzw2z that will translate
  compressed floating point rasters from LZW to DEFLATE.  It is 
  only lightly tested.  The source is available here:
  http://www.jps.net/egm2/r.lzw2z.tgz

3) Modify the files "put_row.c" and "get_row.c" in grass/src/libes/gis
   by commenting out '#define USE_LZW_COMPRESSION'.

4) Edit grass/src/libes/gis/Gmakefile, adding an entry for "flate.o".

5) Edit grass/src/CMD/generic/make.mid adding either "-lz" or "$(ZLIB)"
   behind "GISLIB  = $(LIBDIR)/libgis.a". This is needed because all
   modules linking to GISLIB will now have to link to libz.

6) Recompile the libgis.a

7) At the top src dir, run "make install" again to relink all modules
   to new libgis.a.  (Note, there may be some modules which this will
   have no effect on and they must be completely recompiled).

8) Test away!

If you receive error such as "ERROR: unable to read row[n]!", first make
sure the module you are using has been recompiled completely.  If there
is still a problem, then let me know.

I appreciate all the help I can get testing this out.  It is very
important it is well tested before we axe LZW compression.  I have yet
to test out similar configuration with G3d files (though, the functions
to do so are in place).

Cheers,
   
-- 
Eric G. Miller <egm2 at jps.net>

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list