[GRASS-SVN] r61323 - grass/branches/releasebranch_7_0/raster/r.compress

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 22 07:05:17 PDT 2014


Author: neteler
Date: 2014-07-22 07:05:17 -0700 (Tue, 22 Jul 2014)
New Revision: 61323

Modified:
   grass/branches/releasebranch_7_0/raster/r.compress/r.compress.html
Log:
r.compress manual: mention zlib; explain relationship map precision vs compression (may be improved) (trunk, r60814)

Modified: grass/branches/releasebranch_7_0/raster/r.compress/r.compress.html
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.compress/r.compress.html	2014-07-22 13:31:07 UTC (rev 61322)
+++ grass/branches/releasebranch_7_0/raster/r.compress/r.compress.html	2014-07-22 14:05:17 UTC (rev 61323)
@@ -1,38 +1,63 @@
 <h2>DESCRIPTION</h2>
 
-The GRASS program <em>r.compress</em> can be used to compress and decompress
+<em>r.compress</em> can be used to compress and decompress
 raster map layers.
 
 <p>
-During compression, this program reformats raster maps
-using a run-length-encoding (RLE) algorithm.  Raster map
+During compression, this program reformats raster maps using a run-length-encoding
+(RLE) or ZLIB's "deflate" (LZ77-based) algorithm. Raster map
 layers which contain very little information (such as
 boundary, geology, soils and land use maps) can be greatly
 reduced in size. Some raster map layers are shrunk to
 roughly 1% of their original sizes.  Raster map layers
 containing complex images such as elevation and photo or
 satellite images may increase slightly in size.
-<!-- The 'new compressed format' probably isn't new anymore as of 2008. - EP 
-GRASS uses a new compressed format, -->
-All new raster maps are now automatically stored in compressed 
-form (see FORMATS below).  GRASS programs can read both compressed 
-and regular (uncompressed) file formats.  This allows the use
-of whichever raster data format consumes less space.
+All newly generated raster maps are automatically stored in compressed 
+form (see FORMATS below).  Other modules can read both compressed 
+and regular (uncompressed) file formats.
 
 <p>
 As an example, the Spearfish data base raster map layer
 <em>owner</em> was originally a size of 26600 bytes.  After
-it was compressed, the raster map became only 1249 bytes
+it was RLE compressed, the raster map became only 1249 bytes
 (25351 bytes smaller).
 
 <p>
-Raster files may be decompressed to return them to their
+Raster files may be decompressed manually to return them to their
 original format, using the <b>-u</b> flag of 
 <em>r.compress</em>. If <em>r.compress</em> is asked to
 compress a raster map which is already compressed (or to
 decompress an already decompressed raster map), it simply informs
-the user the map is already (de)compressed and exits. 
+the user the map is already (de)compressed and exits.
 
+
+<h3>TERMINOLOGY</h3>
+
+<ul>
+<li> INTEGER map (CELL data type): a raster map from INTEGER type (whole
+  numbers only)</li>
+<li> FLOAT map (FCELL data type): a raster map from FLOAT type (4 bytes,
+  7-9 digits precision)</li>
+<li> DOUBLE map (DCELL data type): a raster map from DOUBLE type (8 bytes,
+  15-17 digits precision)</li>
+<li> NULL: represents "no data" in raster maps, to be distinguished from
+  0 (zero) data value</li>
+</ul>
+
+<h3>USED COMPRESSION ALGORITHMS</h3>
+
+Floating point (FCELL, DCELL) raster maps never use RLE compression;
+they are either compressed with ZLIB or uncompressed.
+<p>
+Integer (CELL) raster maps by default RLE compressed or may remain
+uncompressed. If the environment variable <tt>GRASS_INT_ZLIB</tt>
+exists, newly generated compressed integer (CELL type) raster maps will
+be compressed using ZLIB instead of RLE compression. In the internal
+cellhd file, the value for "compressed" is 1 for RLE and 2 for ZLIB.
+<p>
+Obviously, decompression is controlled by the raster map's compression,
+not the environment variable.
+
 <h2>NOTES</h2>
 
 <em>r.compress</em> can be run either non-interactively or
@@ -72,25 +97,16 @@
 is broken up into rows of category values.
 
 <p>
-The <b>compressed</b> format is not so simple, but is quite
+The <b>compressed</b> RLE format is not so simple, but is quite
 elegant in its design. It not only requires less disk space
 to store the raster data, but often can result in faster
 execution of graphic and analysis programs since there is
-less disk I/O. There are two compressed formats: the
+less disk I/O. There are two compressed RLE formats: the
 pre-version 3.0 format (which GRASS programs can read but
 no longer produce), and the version 3.0 format (which is
 automatically used when new raster map layers are
 created).
 
-<p>
-RLE compression versus zlib compression: if the environment variable
-GRASS_INT_ZLIB exists, new raster maps will be compressed using zlib 
-instead of RLE compression. In the cellhd file, the value for
-"compressed" is 1 for RLE and 2 for zlib.
-<br>
-Obviously, decompression is controlled by the raster's "compressed"
-header value, not the environment variable.
-
 <h4>PRE-3.0 FORMAT:</h4> 
 
 First 3 bytes (chars) - These are a special code that identifies 



More information about the grass-commit mailing list