r.fillnulls.html 3.8 KB

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