r.fillnulls.html 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <h2>DESCRIPTION</h2>
  2. <em>r.fillnulls</em> fills NULL pixels (no data areas) in input map and
  3. stores filled map to a new output map. The fill data are interpolated
  4. from the no data area boundaries buffer using <em>v.surf.rst</em>
  5. spline interpolation.
  6. <h2>NOTES</h2>
  7. Each area boundary buffer is set to three times the map resolution to get nominally
  8. three points around the edge. This way the algorithm interpolates into the hole with
  9. a trained slope and curvature at the edges, in order to avoid that such a flat plane
  10. is generated in a hole.
  11. <p>During the interpolation following warning may occur:<p>
  12. <tt>
  13. Warning: strip exists with insufficient data<br>
  14. Warning: taking too long to find points for interpolation--please change
  15. the region to area where your points are</tt>
  16. <p>
  17. This warning is generated if large data holes exist within the surface.
  18. As the idea of <em>r.fillnulls</em> is to fill such holes, the user may
  19. ignore the warning. The interpolation will be continued. However, the user
  20. may pay attention to below notes.
  21. <h2>NOTES</h2>
  22. The algorithm is based on <em>v.surf.rst</em>
  23. regularized splines with tension interpolation module which interpolates the
  24. raster cell values for NULL data areas from the boundary values of the NULL
  25. data area. An eventual raster MASK is respected during the NULL data area(s)
  26. filling. The interpolated values are patched into the NULL data area(s) of
  27. the input map and saved into a new raster map.
  28. <h2>WARNING</h2>
  29. Depending on the shape of the NULL data area(s) problems may occur due to an
  30. insufficient number of input cell values for the interpolation process. Most
  31. problems will occur if a NULL data area reaches a large amount of the map
  32. boundary. The user will have to carefully check the result using
  33. <em>r.mapcalc</em> (generating a difference map to the
  34. input map) and/or <em>d.what.rast</em> to query individual cell values.
  35. <h2>EXAMPLE</h2>
  36. In this example, the SRTM elevation map in the
  37. North Carolina sample dataset location is filtered for outlier
  38. elevation values; missing pixels are then re-interpolated to obtain
  39. a complete elevation map:
  40. <div class="code"><pre>
  41. g.region rast=elev_srtm_30m -p
  42. d.mon wx0
  43. d.histogram elev_srtm_30m
  44. # remove too low elevations (esp. lakes)
  45. r.mapcalc "elev_srtm_30m_filt = if(elev_srtm_30m &lt; 50.0, null(), elev_srtm_30m)"
  46. d.histogram elev_srtm_30m_filt
  47. d.rast elev_srtm_30m_filt
  48. r.fillnulls input=elev_srtm_30m_filt output=elev_srtm_30m_complete tension=20
  49. d.histogram elev_srtm_30m_complete
  50. d.rast elev_srtm_30m_complete
  51. </pre></div>
  52. <h2>SEE ALSO</h2>
  53. <em>
  54. <a href="r.fill.dir.html">r.fill.dir</a>,
  55. <a href="r.mapcalc.html">r.mapcalc</a>,
  56. <a href="v.surf.rst.html">v.surf.rst</a>
  57. </em>
  58. <h2>REFERENCES</h2>
  59. <p> Mitas, L., Mitasova, H., 1999, Spatial Interpolation. In: P.Longley,
  60. M.F. Goodchild, D.J. Maguire, D.W.Rhind (Eds.), Geographical Information
  61. Systems: Principles, Techniques, Management and Applications, Wiley,
  62. pp.481-492
  63. <p>Mitasova H., Mitas L.,&nbsp; Brown W.M.,&nbsp; D.P. Gerdes, I.
  64. Kosinovsky, Baker, T.1995, Modeling spatially and temporally distributed
  65. phenomena: New methods and tools for GRASS GIS. <i>International Journal of
  66. GIS</i>, 9 (4), special issue on Integrating GIS and Environmental modeling,
  67. 433-446.
  68. <p><a href="http://skagit.meas.ncsu.edu/~helena/gmslab/papers/lmg.rev1.ps">Mitasova H.
  69. and Mitas L. 1993</a>: Interpolation by Regularized Spline with Tension: I.
  70. Theory and Implementation, <i>Mathematical Geology</i> 25, 641-655.
  71. <p><a href="http://skagit.meas.ncsu.edu/~helena/gmslab/papers/hmg.rev1.ps">Mitasova H.
  72. and Hofierka L. 1993</a>: Interpolation by Regularized Spline with Tension:
  73. II. Application to Terrain Modeling and Surface Geometry Analysis,
  74. <i>Mathematical Geology</i> 25, 657-667.
  75. <h2>AUTHORS</h2>
  76. r.fillnulls: Markus Neteler, University of Hannover<p>and authors of v.surf.rst<br>
  77. Improvement by Hamish Bowman, NZ
  78. <p><i>Last changed: $Date$</i>