.TH v.sample 1grass "" "GRASS 6.4.4" "Grass User's Manual" .SH NAME \fI\fBv.sample\fR\fR - Samples a raster map at vector point locations. .SH KEYWORDS vector, raster, resample .SH SYNOPSIS \fBv.sample\fR .br \fBv.sample help\fR .br \fBv.sample\fR [\-\fBbcq\fR] \fBinput\fR=\fIname\fR \fBcolumn\fR=\fIstring\fR \fBoutput\fR=\fIname\fR \fBraster\fR=\fIname\fR [\fBz\fR=\fIfloat\fR] [\-\-\fBoverwrite\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] .SS Flags: .IP "\fB\-b\fR" 4m .br Bilinear interpolation (default is nearest neighbor) .IP "\fB\-c\fR" 4m .br Cubic convolution interpolation (default is nearest neighbor) .IP "\fB\-q\fR" 4m .br Quiet .IP "\fB\-\-overwrite\fR" 4m .br Allow output files to overwrite existing files .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .PP .SS Parameters: .IP "\fBinput\fR=\fIname\fR" 4m .br Vector map defining sample points .IP "\fBcolumn\fR=\fIstring\fR" 4m .br Vector map attribute column to use for comparison .IP "\fBoutput\fR=\fIname\fR" 4m .br Vector map to store differences .IP "\fBraster\fR=\fIname\fR" 4m .br Raster map to be sampled .IP "\fBz\fR=\fIfloat\fR" 4m .br Option scaling factor for values read from raster map. Sampled values will be multiplied by this factor .br Default: \fI1.0\fR .PP .SH DESCRIPTION \fIv.sample\fR samples a GRASS raster map at the point locations in the input file by either cubic convolution interpolation, bilinear interpolation, or nearest neighbor sampling (default). .PP This program may be especially useful when sampling for cross validation of interpolations whose output is a raster map. .SH NOTES The output points will have the easting and northing of the input points. The input category value is used. The input attribute, raster value and difference is written to output. .PP When NULL values are encountered for a cell, zero value is used instead. In these cases, more acurrate results may be obtained by using the default nearest neighbor comparisons. .PP This program may not work properly with lat-long data when the \fB-bc\fR flags are used. .PP When interpolation is done (i.e., the \fB-bc\fR flags are used), values are assumed to be located at the centroid of grid cells. Therefore, current resolution settings are important. .SH EXAMPLE Comparison of "elevation.dem" and "elevation.10m" Spearfish maps at random places: \fC .DS .br #generate random points: .br v.random output=random n=100 .br #add table with one column: .br v.db.addtable random col="el10 double" .br #transfer elevations at random points into table: .br v.what.rast rast=elevation.10m vect=random col=el10 .br #verify: .br v.db.select random .br .br #generate sampling from other elevation map: .br v.sample in=random col=el10 rast=elevation.dem out=elev_sample .br .br #verify: .br v.db.select elev_sample .br .br #univariate statistics of differences between elevation maps: .br v.univar elev_sample col=diff type=point .br .DE \fR .SH SEE ALSO \fI g.region, v.random, v.what.rast \fR \fIImage Sampling Methods\fR - GRASS Tutorial on \fIs.sample\fR (available as s.sample-tutorial.ps.gz) .SH AUTHORS James Darrell McCauley .br when he was at: Agricultural Engineering Purdue University .PP Updated for GRASS 5.0 by Eric G. Miller .br Updated for GRASS 5.7 by Radim Blazek .PP \fILast changed: $Date: 2012-07-19 12:10:03 +0200 (Thu, 19 Jul 2012) $\fR .PP Full index .PP © 2003-2014 GRASS Development Team