.TH v.random 1grass "" "GRASS 6.4.2" "Grass User's Manual" .SH NAME \fI\fBv.random\fR\fR - Randomly generate a 2D/3D vector points map. .SH KEYWORDS vector, statistics .SH SYNOPSIS \fBv.random\fR .br \fBv.random help\fR .br \fBv.random\fR [-\fBzdb\fR] \fBoutput\fR=\fIname\fR \fBn\fR=\fIinteger\fR [\fBzmin\fR=\fIfloat\fR] [\fBzmax\fR=\fIfloat\fR] [\fBcolumn\fR=\fIstring\fR] [--\fBoverwrite\fR] [--\fBverbose\fR] [--\fBquiet\fR] .SS Flags: .IP "\fB-z\fR" 4m .br Create 3D output .IP "\fB-d\fR" 4m .br Use drand48() function instead of rand() .IP "\fB-b\fR" 4m .br Do not build topology .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 "\fBoutput\fR=\fIname\fR" 4m .br Name for output vector map .IP "\fBn\fR=\fIinteger\fR" 4m .br Number of points to be created .IP "\fBzmin\fR=\fIfloat\fR" 4m .br Minimum z height (needs -z flag or column name) .br Default: \fI0.0\fR .IP "\fBzmax\fR=\fIfloat\fR" 4m .br Maximum z height (needs -z flag or column name) .br Default: \fI0.0\fR .IP "\fBcolumn\fR=\fIstring\fR" 4m .br Column name and type (i.e. INTEGER, DOUBLE PRECISION) for z values .br If type is not given then DOUBLE PRECISION is used. Writes Z data to column instead of 3D vector. .PP .SH DESCRIPTION \fIv.random\fR randomly generates vector points within the current region using the selected random number generator. .PP \fIv.random\fR can generate also 3D vector points or write random value to attribute table. Point height range or attribute value range is controlled by specifying zmin and zmax values. Both z values are included in range (\fIzmin >= z <= zmax\fR). Generated random attribute value type can be controlled by column data type. Use \fBINTEGER\fR column type for integers and \fBDOUBLE PRECISION\fR for floating point numbers. Integer values are calculated by rounding random floating point number. .SH EXAMPLES Generate 20 random points with binary attribute (only 0 or 1): \fC .DS .br v.random output=binary_random n=20 zmin=0 zmax=1 column='binary INTEGER' .br .DE \fR Get 20 random samples from raster map: \fC .DS .br v.random output=random_samples n=20 .br v.db.addtable map=random_samples layer=1 columns='cat INTEGER, sample DOUBLE PRECISION' .br v.what.rast vector=random_samples raster=elevation.10m@PERMANENT layer=1 column=sample .br .DE \fR Generate 20 random points and sample attribute data from geology (vector) map: \fC .DS .br v.random output=random_samples n=20 .br v.db.addtable map=random_samples layer=1 columns='cat integer, geology varchar(100)' .br v.what.vect vector=random_samples layer=1 column=geology qvector=geology@PERMANENT qlayer=1 qcolumn=label .br .DE \fR .SH SEE ALSO UNIX man pages for \fIrand(3)\fR and \fIdrand48(3)\fR. .PP \fI g.region, r.random, v.perturb, v.sample v.what.rast v.what.vect \fR .SH BUGS The RNG used by \fIv.perturb\fR should probably be added to this program. .br .SH AUTHOR James Darrell McCauley , .br when he was at: Agricultural Engineering Purdue University .PP \fILast changed: $Date: 2011-11-08 12:29:50 +0100 (Tue, 08 Nov 2011) $\fR .PP Full index .PP © 2003-2011 GRASS Development Team