r.surf.idw.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <h2>DESCRIPTION</h2>
  2. <em>r.surf.idw</em> fills a grid cell (raster) matrix with
  3. interpolated values generated from input raster
  4. data points. It uses a numerical approximation technique
  5. based on distance squared weighting of the values of
  6. nearest data points. The number of nearest data points used
  7. to determined the interpolated value of a cell can be
  8. specified by the user (default: 12 nearest data points).
  9. <p>
  10. If there is a current working mask, it applies to the output
  11. raster map. Only those cells falling within the mask will be
  12. assigned interpolated values. The search procedure for the
  13. selection of nearest neighboring points will consider all
  14. input data, without regard to the mask.
  15. The <b>-e</b> flag is the error analysis option that interpolates values
  16. only for those cells of the input raster map which have non-zero values and
  17. outputs the difference (see <a href="#minuse.html">NOTES</a> below).
  18. <p>The <b>npoints</b> parameter defines the number of nearest data points used
  19. to determine the interpolated value of an output raster cell.
  20. <h2>NOTES</h2>
  21. <em>r.surf.idw</em> is a surface generation utility which
  22. uses inverse distance squared weighting (as described in
  23. <i>Applied Geostatistics</i> by E. H. Isaaks and R. M.
  24. Srivastava, Oxford University Press, 1989) to assign
  25. interpolated values. The implementation includes a
  26. customized data structure somewhat akin to a sparse matrix
  27. which enhances the efficiency with which nearest data
  28. points are selected. For latitude/longitude projections,
  29. distances are calculated from point to point along a
  30. geodesic.
  31. <p>
  32. Unlike <em><a href="https://grass.osgeo.org/grass7/manuals/addons/r.surf.idw2.html">r.surf.idw2</a></em> (addon),
  33. which processes all input data points in each interpolation cycle, <em>r.surf.idw</em>
  34. attempts to minimize the number of input data for which distances must be
  35. calculated. Execution speed is therefore a function of the search effort,
  36. and does not increase appreciably with the number of input data points.
  37. <p>
  38. <em>r.surf.idw</em> will generally outperform
  39. <em>r.surf.idw2</em> except when the input data
  40. layer contains few non-zero data, i.e. when the cost of the search exceeds
  41. the cost of the additional distance calculations performed by
  42. <em>r.surf.idw2</em>. The relative performance
  43. of these utilities will depend on the comparative speed of boolean, integer
  44. and floating point operations on a particular platform.
  45. <p>
  46. Worst case search performance by <em>r.surf.idw</em> occurs
  47. when the interpolated cell is located outside of the region
  48. in which input data are distributed. It therefore behooves
  49. the user to employ a mask when geographic region boundaries
  50. include large areas outside the general extent of the input
  51. data.
  52. <p>
  53. The degree of smoothing produced by the interpolation will
  54. increase relative to the number of nearest data points
  55. considered. The utility may be used with regularly or
  56. irregularly spaced input data. However, the output result
  57. for the former may include unacceptable nonconformities in
  58. the surface pattern.
  59. <a name="minuse.html"></a>
  60. <p>
  61. The <b>-e</b> flag option provides a standard
  62. surface-generation error analysis facility. It produces an output raster map
  63. of the difference of interpolated values minus input values for those cells
  64. whose input data are non-zero. For each interpolation cycle, the known value
  65. of the cell under consideration is ignored, and the remaining input values
  66. are used to interpolate a result. The output raster map may be compared to
  67. the input raster map to analyze the distribution of interpolation error.
  68. This procedure may be helpful in choosing the number of nearest neighbors
  69. considered for surface generation.
  70. <!-- requires https://trac.osgeo.org/grass/ticket/2672 to be fixed:
  71. <h2>EXAMPLE</h2>
  72. Interpolation of raster surface from randomly sampled vector elevation
  73. points (North Carolina sample dataset region):
  74. <div class="code"><pre>
  75. g.region vector=elev_lid792_randpts res=1 -p
  76. # rasterize points
  77. v.to.rast input=elev_lid792_randpts use=attr attribute_column=value \
  78. output=elev_lid792_randpts_1m
  79. # interpolation DEM
  80. r.surf.idw input=elev_lid792_randpts_1m output=elev_surf_1m_idw
  81. # validate: differences to original DEM
  82. r.mapcalc "elev_diff = elev_lid792_1m - elev_surf_1m_idw"
  83. r.colors map=elev_diff color=differences
  84. </pre></div>
  85. -->
  86. <h2>KNOWN ISSUES</h2>
  87. Module <em>r.surf.idw</em> works only for integer (CELL) raster maps.
  88. <h2>SEE ALSO</h2>
  89. <em>
  90. <a href="r.surf.contour.html">r.surf.contour</a>,
  91. <a href="r.surf.gauss.html">r.surf.gauss</a>,
  92. <a href="r.surf.fractal.html">r.surf.fractal</a>,
  93. <a href="r.surf.random.html">r.surf.random</a>,
  94. <a href="v.surf.idw.html">v.surf.idw</a>,
  95. <a href="v.surf.rst.html">v.surf.rst</a>
  96. </em>
  97. <p>
  98. Overview: <a href="https://grasswiki.osgeo.org/wiki/Interpolation">Interpolation and Resampling</a> in GRASS GIS
  99. <h2>AUTHOR</h2>
  100. Greg Koerper <br>
  101. Global Climate Research Project <br>
  102. U.S. EPA Environmental Research Laboratory <br>
  103. 200 S.W. 35th Street, JSB <br>
  104. Corvallis, OR 97333
  105. <p>
  106. <i>Last changed: $Date$</i>