r.fillnulls.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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> or
  5. <em>v.surf.bspline</em> 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. The widht of edge area can be adjusted by
  11. changing the edge parameter.
  12. <p>During the interpolation following warning may occur when using the RST method:<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. <p>
  23. If interpolation fails, temporary raster and vector maps are left in place to allow
  24. unfilled map hole (NULL area) identification and manual repair.
  25. <h2>NOTES</h2>
  26. When using the default RST method, the algorithm is based on <em>v.surf.rst</em>
  27. regularized splines with tension interpolation module which interpolates the
  28. raster cell values for NULL data areas from the boundary values of the NULL
  29. data area. An eventual raster MASK is respected during the NULL data area(s)
  30. filling. The interpolated values are patched into the NULL data area(s) of
  31. the input map and saved into a new raster map.
  32. Otherwise, either the bilinear or bicubic method can be selected (based on
  33. <em>v.surf.bspline</em>).
  34. <h2>WARNING</h2>
  35. Depending on the shape of the NULL data area(s) problems may occur due to an
  36. insufficient number of input cell values for the interpolation process. Most
  37. problems will occur if a NULL data area reaches a large amount of the map
  38. boundary. The user will have to carefully check the result using
  39. <em>r.mapcalc</em> (generating a difference map to the
  40. input map and applying the "differences" color table with <em>r.colors</em>)
  41. and/or <em>d.what.rast</em> to query individual cell values.
  42. <h2>WARNING</h2>
  43. RST method stores temporary maps on hard disk. It will require at least as much
  44. free space as one extra input raster map takes.
  45. <h2>EXAMPLE</h2>
  46. In this example, the SRTM elevation map in the
  47. North Carolina sample dataset location is filtered for outlier
  48. elevation values; missing pixels are then re-interpolated to obtain
  49. a complete elevation map:
  50. <div class="code"><pre>
  51. g.region rast=elev_srtm_30m -p
  52. d.mon wx0
  53. d.histogram elev_srtm_30m
  54. # remove too low elevations (esp. lakes)
  55. r.mapcalc "elev_srtm_30m_filt = if(elev_srtm_30m &lt; 50.0, null(), elev_srtm_30m)"
  56. d.histogram elev_srtm_30m_filt
  57. d.rast elev_srtm_30m_filt
  58. r.fillnulls input=elev_srtm_30m_filt output=elev_srtm_30m_complete tension=20
  59. d.histogram elev_srtm_30m_complete
  60. d.rast elev_srtm_30m_complete
  61. </pre></div>
  62. <h2>SEE ALSO</h2>
  63. <em>
  64. <a href="r.fill.dir.html">r.fill.dir</a>,
  65. <a href="r.mapcalc.html">r.mapcalc</a>,
  66. <a href="v.surf.bspline.html">v.surf.bspline</a>,
  67. <a href="v.surf.rst.html">v.surf.rst</a>
  68. </em>
  69. <h2>REFERENCES</h2>
  70. <p> Mitas, L., Mitasova, H., 1999, Spatial Interpolation. In: P.Longley,
  71. M.F. Goodchild, D.J. Maguire, D.W.Rhind (Eds.), Geographical Information
  72. Systems: Principles, Techniques, Management and Applications, Wiley,
  73. pp.481-492
  74. <p>Mitasova H., Mitas L.,&nbsp; Brown W.M.,&nbsp; D.P. Gerdes, I.
  75. Kosinovsky, Baker, T.1995, Modeling spatially and temporally distributed
  76. phenomena: New methods and tools for GRASS GIS. <i>International Journal of
  77. GIS</i>, 9 (4), special issue on Integrating GIS and Environmental modeling,
  78. 433-446.
  79. <p><a href="http://skagit.meas.ncsu.edu/~helena/gmslab/papers/lmg.rev1.ps">Mitasova H.
  80. and Mitas L. 1993</a>: Interpolation by Regularized Spline with Tension: I.
  81. Theory and Implementation, <i>Mathematical Geology</i> 25, 641-655.
  82. <p><a href="http://skagit.meas.ncsu.edu/~helena/gmslab/papers/hmg.rev1.ps">Mitasova H.
  83. and Hofierka L. 1993</a>: Interpolation by Regularized Spline with Tension:
  84. II. Application to Terrain Modeling and Surface Geometry Analysis,
  85. <i>Mathematical Geology</i> 25, 657-667.
  86. <h2>AUTHORS</h2>
  87. r.fillnulls: Markus Neteler, University of Hannover and Fondazione Edmund Mach
  88. <p>and authors of v.surf.rst<br>
  89. Improvement by Hamish Bowman, NZ
  90. <p><i>Last changed: $Date$</i>