v.perturb(1)

✨ NAME ✨

okay so this is v.perturb from the GRASS GIS User's Manual bestie πŸ’– β€” it does random location perturbations of vector points. that's the whole vibe. it takes points and it ✨jiggles✨ them.


🏷️ KEYWORDS 🏷️

vector, geometry, statistics, random, point pattern, level1


πŸ“œ SYNOPSIS πŸ“œ

v.perturb
v.perturb --help
v.perturb [-sb] input=name  [layer=string]  output=name
[distribution=string]  parameters=float[,float,...]  [minimum=float]
[seed=integer]   [--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]

🚩 Flags:

  • -s β€” generate random seed (ngl the result is non-deterministic, so don't come for me if you can't reproduce it πŸ’€)
  • -b β€” do not build topology. lowkey advantageous when you're handling a large number of points 🫢
  • --overwrite β€” allow output files to overwrite existing files (yes it will really do it, be brave)
  • --help β€” print usage summary
  • --verbose β€” verbose module output (it's giving chatty ✨)
  • --quiet β€” quiet module output (shhh 🀫)
  • --ui β€” force launching GUI dialog

πŸŽ€ Parameters:

  • input=name [required] β€” name of input vector map. or, plot twist, a data source for direct OGR access πŸ‘‘
  • layer=string β€” layer number or name ('-1' for all layers). a single vector map can be connected to multiple database tables, and this number determines which table to use. when used with direct OGR access, this is the layer name.
    • Default: -1
  • output=name [required] β€” name for output vector map
  • distribution=string β€” distribution of perturbation
    • Options: uniform, normal
    • Default: uniform
  • parameters=float[,float,...] [required] β€” parameter(s) of distribution. if the distribution is uniform, only one parameter β€” the maximum β€” is needed. for a normal distribution, two parameters β€” the mean and standard deviation β€” are required. (it's giving "read the fine print" bestie πŸ“–)
  • minimum=float β€” minimum deviation in map units
    • Default: 0.0
  • seed=integer β€” seed for random number generation

πŸ’« DESCRIPTION πŸ’«

v.perturb reads a vector map of points and writes the same points but perturbs the eastings and northings by adding either a uniform or normal delta value. and what does perturbation even mean?? it means a variating spatial deviation is added to the coordinates. periodt. πŸ’…


πŸ“ NOTES πŸ“

the uniform distribution is always centered about zero. the associated parameter is constrained to be positive and specifies the maximum of the distribution; the minimum is the negation of that parameter. so if you wanna perturb into a ring around the center, the minimum parameter is your girl πŸŽ€

usually, the mean (first parameter) of the normal distribution is zero (i.e., the distribution is centered at zero). the standard deviation (second parameter) is naturally constrained to be positive. no cap.

⚠️ output vector points are not guaranteed to be contained within the current geographic region. like, they can absolutely wander off. bye bestie πŸ‘‹

🌸 EXAMPLES 🌸

🎲 Random, uniformly distributed selection

to create a random, uniformly distributed selection of possible new points with a radius of 100,000 map units, use the following command:

v.perturb input=comm_colleges output=uniform_perturb parameters=100000

your map should look similar to this figure:

Figure: Map showing the actual community college points and uniformly random chosen points. πŸ—ΊοΈ

πŸ”” Normal distributed selection

for a normal distribution with a mean of 5000 and standard deviation of 2000, use the following command:

v.perturb input=comm_colleges output=normal_perturb distribution=normal parameters=5000,2000

Figure: Map showing the actual community college points and normally random chosen and colored points. Notice that each point is closer to the original point. πŸ‘€

⭐ Normal distributed selection with a minimum value

in order to include a minimum value of 500, use the following command:

v.perturb input=comm_colleges output=min_perturb distribution=normal parameters=100000,1000 minimum=500

πŸ‘€ SEE ALSO πŸ‘€

  • v.random
  • v.univar

πŸ‘‘ AUTHORS πŸ‘‘

  • James Darrell McCauley
    • when he was at: Agricultural Engineering Purdue University
  • Random number generators originally written in FORTRAN by Wes Peterson and translated to C using f2c.

🧚 SOURCE CODE 🧚

Available at: v.perturb source code (history)

Accessed: Saturday Jan 17 05:41:29 2026

Main index | Vector index | Topics index | Keywords index | Graphical index | Full index


Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual

okay that's the whole thing bestie, we ate and left no crumbs πŸ“ this was v.perturb(1) from the GRASS GIS 8.4.2 manual, page accessed Saturday Jan 17 05:41:29 2026, mwah πŸ’œβœ¨

πŸ“¦ where this page comes from