v.sample.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 "elevation.dem" and "elevation.10m" Spearfish maps
  24. at random places:
  25. <div class="code"><pre>
  26. #generate random points:
  27. v.random output=random n=100
  28. #add table with one column:
  29. v.db.addtable random col="el10 double"
  30. #transfer elevations at random points into table:
  31. v.what.rast rast=elevation.10m vect=random col=el10
  32. #verify:
  33. v.db.select random
  34. #generate sampling from other elevation map:
  35. v.sample in=random col=el10 rast=elevation.dem out=elev_sample
  36. #verify:
  37. v.db.select elev_sample
  38. #univariate statistics of differences between elevation maps:
  39. v.univar elev_sample col=diff type=point
  40. </pre></div>
  41. <h2>SEE ALSO</h2>
  42. <em>
  43. <a href="v.random.html">v.random</a>,
  44. <a href="g.region.html">g.region</a>
  45. </em>
  46. <em>Image Sampling Methods</em> - GRASS Tutorial on <em>s.sample</em>
  47. (available as
  48. <a href="http://grass.osgeo.org/gdp/sites/">s.sample-tutorial.ps.gz</a>)
  49. <h2>AUTHOR</h2>
  50. <a href="http://mccauley-usa.com/">James Darrell McCauley</a>
  51. <br>when he was at:
  52. <a href="http://ABE.www.ecn.purdue.edu/ABE/">Agricultural Engineering</a>
  53. <a href="http://www.purdue.edu/">Purdue University</a>
  54. <p>Updated for GRASS 5.0 by Eric G. Miller
  55. <br>
  56. Updated for GRASS 5.7 by Radim Blazek
  57. <p><i>Last changed: $Date$</i>