r.null.html 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <h2>DESCRIPTION</h2>
  2. The function of <em>r.null</em> is to explicitly create the NULL-value
  3. bitmap file. The intended usage is to update maps that do not have a
  4. NULL-value bitmap file (i.e. to indicate for each pixel if zero is a valid
  5. value or is to be considered as NULL, i.e. no data value). The module does
  6. not work with reclassified maps.
  7. <p>
  8. The design is flexible. Ranges of values can be set to NULL and/or the NULL
  9. value can be eliminated and replace with a specified value.
  10. <p>
  11. The <b>setnull</b> parameter is used to specify values in the ranges to
  12. be set to NULL. A range is either a single value (e.g., 5.3), or a pair of
  13. values (e.g., 4.76-34.56). Existing NULL-values are left NULL, unless the
  14. null argument is requested.
  15. <p>
  16. The <b>null</b> parameter eliminates the NULL value and replaces it with
  17. value. This argument is applied only to existing NULL values, and not to the
  18. NULLs created by the setnull argument.
  19. <h2>NOTES</h2>
  20. Note that the value is restricted to integer if the map is an integer map.
  21. <h3>r.null and reclassified maps</h3>
  22. <em>r.null</em> does not support reclassified maps because, if <em>r.null</em>
  23. was run on the reclass raster it would alter the original and any other
  24. reclass rasters of the original. Therefore <em>r.null</em> does not allow
  25. recoding reclassified maps (products of <em>r.reclass</em>).
  26. <br>
  27. As a workaround, the way to recode such a map is: The user creates a raster
  28. map out of the reclassified map by copying it:<br>
  29. <div class="code"><pre>
  30. r.mapcalc "newmap = reclass"
  31. </pre></div>
  32. <h3>NULL data compression</h3>
  33. By default no data files (i.e., NULL files) are not compressed unless a
  34. specific environment variable is set. The NULL file compression must be
  35. explicitly turned on with <tt>export GRASS_COMPRESS_NULLS=1</tt>.<br>
  36. Warning: such raster maps can then only be opened with GRASS GIS 7.2.0 or
  37. later. NULL file compression can be managed with <b>r.null -z</b>.
  38. <h2>EXAMPLES</h2>
  39. Set specific values of a classified map to NULL:<br>
  40. <div class="code"><pre>
  41. r.null map=landcover.30m setnull=21,22
  42. </pre></div>
  43. Set NULL-values of a map to a specific value:<br>
  44. <div class="code"><pre>
  45. r.null map=fields null=99
  46. </pre></div>
  47. <h2>SEE ALSO</h2>
  48. <em>
  49. <a href="r.compress.html">r.compress</a>,
  50. <a href="r.support.html">r.support</a>,
  51. <a href="r.quant.html">r.quant</a>
  52. </em>
  53. <h2>AUTHOR</h2>
  54. U.S.Army Construction Engineering Research Laboratory
  55. <p><i>Last changed: $Date$</i>