v.sample.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <h2>DESCRIPTION</h2>
  2. <em>v.sample</em> samples a GRASS raster map at the point
  3. locations in the input file by either cubic convolution
  4. interpolation, bilinear interpolation, or nearest neighbor
  5. sampling (default).
  6. <p>This program may be especially useful when sampling for
  7. cross validation of interpolations whose output is a raster
  8. map.
  9. <h2>NOTES</h2>
  10. The output points will have the easting and northing of the input points.
  11. The input category value is used. The input attribute, raster value
  12. and difference is written to output.
  13. <p>When NULL values are encountered for a cell, zero value is used
  14. instead. In these cases, more acurrate results may be obtained
  15. by using the default nearest neighbor comparisons.
  16. <p>This program may not work properly with lat-long data when
  17. the <b>-bc</b> flags are used.
  18. <p>When interpolation is done (i.e., the <b>-bc</b> flags are
  19. used), values are assumed to be located at the centroid of
  20. grid cells. Therefore, current resolution settings are
  21. important.
  22. <h2>EXAMPLE</h2>
  23. Comparison of "elev_ned_30m" and "elev_srtm_30m" North Carolina
  24. sample dataset elevation models at random positions:
  25. <div class="code"><pre>
  26. # set computational region:
  27. g.region raster=elev_srtm_30m -p
  28. # generate random points:
  29. v.random output=random n=100
  30. # add table with one column:
  31. v.db.addtable random col="elev_srtm30 double precision"
  32. # transfer elevations at random points into table:
  33. v.what.rast map=random rast=elev_srtm_30m col=elev_srtm30
  34. # verify:
  35. v.db.select random
  36. # perform sampling on other elevation map:
  37. v.sample in=random col=elev_srtm30 rast=elev_ned_30m out=elev_samples
  38. #verify:
  39. v.db.select elev_samples
  40. #univariate statistics of differences between elevation maps:
  41. v.univar elev_samples column=diff type=point
  42. </pre></div>
  43. <h2>SEE ALSO</h2>
  44. <em>
  45. <a href="g.region.html">g.region</a>,
  46. <a href="v.random.html">v.random</a>,
  47. <a href="v.what.rast.html">v.what.rast</a>
  48. </em>
  49. <em>Image Sampling Methods</em> - GRASS Tutorial on <em>s.sample</em>
  50. (available as
  51. <a href="http://grass.osgeo.org/gdp/sites/">s.sample-tutorial.ps.gz</a>)
  52. <h2>AUTHOR</h2>
  53. <a href="http://mccauley-usa.com/">James Darrell McCauley</a>
  54. <br>when he was at:
  55. <a href="http://ABE.www.ecn.purdue.edu/ABE/">Agricultural Engineering</a>
  56. <a href="http://www.purdue.edu/">Purdue University</a>
  57. <p>Updated for GRASS 5.0 by Eric G. Miller
  58. <br>
  59. Updated for GRASS 5.7 by Radim Blazek
  60. <p><i>Last changed: $Date$</i>