v.sample.html 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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>
  7. This program may be especially useful when sampling for
  8. cross validation of interpolations whose output is a raster
  9. map.
  10. <H2>NOTES</H2>
  11. The output points will have the easting and northing of the input points.
  12. The input category value is used. The input attribute, raster value
  13. and difference is written to output.
  14. <P>
  15. When NULL values are encountered for a cell, zero value is used
  16. instead. In these cases, more acurrate results may be obtained
  17. by using the default nearest neighbor comparisons.
  18. <P>
  19. This program may not work properly with lat-long data when
  20. the <B>-BC</B> flags are used.
  21. <P>
  22. When interpolation is done (i.e., the <B>-BC</B> flags are
  23. used), values are assumed to be located at the centroid of
  24. grid cells. Therefore, current resolution settings are
  25. important.
  26. <H2>EXAMPLE</H2>
  27. Comparison of "elevation.dem" and "elevation.10m" Spearfish maps
  28. at random places:
  29. <div class="code"><pre>
  30. #generate random points:
  31. v.random output=random n=100
  32. #add table with one column:
  33. v.db.addtable random col="el10 double"
  34. #transfer elevations at random points into table:
  35. v.what.rast rast=elevation.10m vect=random col=el10
  36. #verify:
  37. v.db.select random
  38. #generate sampling from other elevation map:
  39. v.sample in=random col=el10 rast=elevation.dem out=elev_sample
  40. #verify:
  41. v.db.select elev_sample
  42. #univariate statistics of differences between elevation maps:
  43. v.univar elev_sample col=diff type=point
  44. </pre></div>
  45. <H2>SEE ALSO</H2>
  46. <EM>
  47. <A HREF="v.random.html">v.random</A>,
  48. <A HREF="g.region.html">g.region</A>
  49. </EM>
  50. <EM>Image Sampling Methods</EM> - GRASS Tutorial on <EM>s.sample</EM>
  51. (available as
  52. <A HREF="http://grass.itc.it/gdp/sites/">s.sample-tutorial.ps.gz</A>)
  53. <H2>AUTHOR</H2>
  54. <A HREF="http://mccauley-usa.com/">James Darrell McCauley</A>
  55. <br>when he was at:
  56. <A HREF="http://ABE.www.ecn.purdue.edu/ABE/">Agricultural Engineering</A>
  57. <A HREF="http://www.purdue.edu/">Purdue University</A>
  58. <P>
  59. Updated for GRASS 5.0 by Eric G. Miller
  60. <BR>
  61. Updated for GRASS 5.7 by Radim Blazek
  62. <p><i>Last changed: $Date$</i>