**--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

**output**=*name***[required]**- Name for output raster map
**distance**=*float***[required]**- Maximum distance of spatial correlation (value >= 0.0)
**ncells**=*integer*- Maximum number of cells to be created
- Options:
*1-* **seed**=*integer*- Random seed, default [random]

**output**- Random cells. Each random cell has a unique non-zero cell value
ranging from 1 to the number of cells generated. The heuristic for
this algorithm is to randomly pick cells until there are no cells
outside of the chosen cell's buffer of radius
**distance**. **distance**- Determines the minimum distance the centers of the random cells will be apart.
**seed**- Specifies the random seed that
*r.random.cells*will use to generate the cells. If the random seed is not given,*r.random.cells*will get a seed from the process ID number.

g.region n=228500 s=215000 w=630000 e=645000 res=100 -p r.random.cells output=random_500m distance=500

g.region raster=elevation g.region rows=20 cols=20 -p

r.random.cells output=random_cells distance=1500 ncells=20 seed=200

r.to.vect input=random_cells output=random_points type=point

Additionally, we can use *v.perturb* module
to add random spatial deviation to their position so that they are not
perfectly aligned with the grid. We cannot perturb the points too much,
otherwise we might seriously break the minimal distance we set earlier.

v.perturb input=random_points output=random_points_moved parameters=50 seed=200

*
Figure: Generated cells with limited number of cells (upper left),
derived vector points (lower left), cells without a count limit
(upper right) and corresponding vector points (lower right)
*

As part of my dissertation, I put together several programs that help GRASS (4.1 and beyond) develop uncertainty models of spatial data. I hope you find it useful and dependable. The following papers might clarify their use:

- Ehlschlaeger, C.R., Shortridge, A.M., Goodchild, M.F., 1997. Visualizing spatial data uncertainty using animation. Computers & Geosciences 23, 387-395. doi:10.1016/S0098-3004(97)00005-8
- Modeling Uncertainty in Elevation Data for Geographical Analysis, by Charles R. Ehlschlaeger, and Ashton M. Shortridge. Proceedings of the 7th International Symposium on Spatial Data Handling, Delft, Netherlands, August 1996.
- Dealing with Uncertainty in Categorical Coverage Maps: Defining, Visualizing, and Managing Data Errors, by Charles Ehlschlaeger and Michael Goodchild. Proceedings, Workshop on Geographic Information Systems at the Conference on Information and Knowledge Management, Gaithersburg MD, 1994.
- Uncertainty in Spatial Data: Defining, Visualizing, and Managing Data Errors, by Charles Ehlschlaeger and Michael Goodchild. Proceedings, GIS/LIS'94, pp. 246-253, Phoenix AZ, 1994.

Available at: r.random.cells source code (history)

Latest change: Wednesday Mar 01 21:08:00 2023 in commit: 1a96f69ccf430caa03bec8dbfc990c07c81f3164

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

© 2003-2024 GRASS Development Team, GRASS GIS 8.3.3dev Reference Manual