EnglishFrenchSpanish

OnWorks favicon

v.randomgrass - Online in the Cloud

Run v.randomgrass in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command v.randomgrass that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


v.random - Generates random 2D/3D vector points.

KEYWORDS


vector, sampling, statistics, random, point pattern

SYNOPSIS


v.random
v.random --help
v.random [-zab] output=name npoints=integer [restrict=name] [layer=string]
[cats=range] [where=sql_query] [zmin=float] [zmax=float] [seed=integer]
[column=name] [column_type=string] [--overwrite] [--help] [--verbose] [--quiet]
[--ui]

Flags:
-z
Create 3D output

-a
Generate n points for each individual area

-b
Do not build topology

--overwrite
Allow output files to overwrite existing files

--help
Print usage summary

--verbose
Verbose module output

--quiet
Quiet module output

--ui
Force launching GUI dialog

Parameters:
output=name [required]
Name for output vector map

npoints=integer [required]
Number of points to be created

restrict=name
Name of input vector map
Restrict points to areas in input vector

layer=string
Layer number or name (’-1’ for all layers)
A single vector map can be connected to multiple database tables. This number
determines which table to use. When used with direct OGR access this is the layer
name.
Default: -1

cats=range
Category values
Example: 1,3,7-9,13

where=sql_query
WHERE conditions of SQL statement without ’where’ keyword
Example: income < 1000 and inhab >= 10000

zmin=float
Minimum z height (needs -z flag or column name)
Default: 0.0

zmax=float
Maximum z height (needs -z flag or column name)
Default: 0.0

seed=integer
The seed to initialize the random generator. If not set the process ID is used

column=name
Name of column for z values
Writes z values to column

column_type=string
Type of column for z values
Options: integer, double precision
Default: double precision

DESCRIPTION


v.random randomly generates vector points within the current region using the selected
random number generator.

v.random 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 (zmin <= z <= zmax). Generated random
attribute value type can be controlled by column data type. Use INTEGER column type for
integers and DOUBLE PRECISION for floating point numbers. Integer values are calculated by
rounding random floating point number.

To produce repeatable results a random seed can be set using the option seed.

Restriction to vector areas
If an input vector map with areas is specified, the location of random points is
restricted to the selected areas. By default, the requested number of points are
distributed across all areas.

If the -a flag is given, the requested number of points is generated for each individual
area. For example, if 20 points should be generated and the input map has 100 individual
areas, 2000 points will be generated in total.

EXAMPLES


All examples use the North Carolina sample dataset.

Generate 20 random points with binary attribute (only 0 or 1):
v.random output=binary_random npoints=20 zmin=0 zmax=1 column=’binary INTEGER’
Generate 20 random 3D points using a specific random seed:
v.random seed=52 output=height_random npoints=40 zmin=110 zmax=170 -z

Random points with different X, Y, and Z coordinates Get 20 random samples from raster
map:
g.region -p raster=elevation
v.random output=random_samples npoints=20
v.db.addtable map=random_samples layer=1 columns=’cat INTEGER, sample DOUBLE PRECISION’
v.what.rast vector=random_samples raster=elevation@PERMANENT layer=1 column=sample
Generate 20 random points and sample attribute data from geology (vector) map:
g.region -p vector=geology
v.random output=random_samples npoints=20
v.db.addtable map=random_samples layer=1 columns=’cat integer, geology varchar(100)’
v.what.vect vector=random_samples layer=1 column=geology \
qvector=geology@PERMANENT qlayer=1 qcolumn=label
Generate 20 random points in forested areas
g.region -p raster=landclass96
r.to.vect -v input=landclass96 output=landclass96 type=area
v.random input=landclass96 output=random_samples npoints=20 \
where="label = ’forest’"
Generate 20 random points in each forest patch
g.region -p raster=landclass96
r.to.vect -v input=landclass96 output=landclass96 type=area
v.random input=landclass96 output=random_samples npoints=20 \
where="label = ’forest’" -a

Use v.randomgrass online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    PAC Manager
    PAC Manager
    PAC is a Perl/GTK replacement for
    SecureCRT/Putty/etc (linux
    ssh/telnet/... gui)... It provides a GUI
    to configure connections: users,
    passwords, EXPECT regula...
    Download PAC Manager
  • 2
    GeoServer
    GeoServer
    GeoServer is an open-source software
    server written in Java that allows users
    to share and edit geospatial data.
    Designed for interoperability, it
    publishes da...
    Download GeoServer
  • 3
    Firefly III
    Firefly III
    A free and open-source personal finance
    manager. Firefly III features a
    double-entry bookkeeping system. You can
    quickly enter and organize your
    transactions i...
    Download Firefly III
  • 4
    Apache OpenOffice Extensions
    Apache OpenOffice Extensions
    The official catalog of Apache
    OpenOffice extensions. You'll find
    extensions ranging from dictionaries to
    tools to import PDF files and to connect
    with ext...
    Download Apache OpenOffice Extensions
  • 5
    MantisBT
    MantisBT
    Mantis is an easily deployable, web
    based bugtracker to aid product bug
    tracking. It requires PHP, MySQL and a
    web server. Checkout our demo and hosted
    offerin...
    Download MantisBT
  • 6
    LAN Messenger
    LAN Messenger
    LAN Messenger is a p2p chat application
    for intranet communication and does not
    require a server. A variety of handy
    features are supported including
    notificat...
    Download LAN Messenger
  • More »

Linux commands

Ad