v.perturb(1grass)
β¨ v.perturb β¨
okay so bestie, this is v.perturb from the GRASS User's Manual π it does random location perturbations of vector points and honestly?? it's giving chaos gremlin in the best way π
πΈ 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 a random seed, which means the result is non-deterministic (so, a different vibe every single run, no cap π)-bβ do not build topology. this one is advantageous when you're handling a large number of points, so like, big brain energy only π
π Standard flags π
--overwriteβ let output files overwrite existing files--helpβ print usage summary--verboseβ verbose module output--quietβ quiet module output--uiβ force launching GUI dialog
π Parameters π
input=name[required] β name of input vector map. or, plot twist, a data source for direct OGR accesslayer=stringβ layer number or name ('-1'for all layers). a single vector map can be connected to multiple database tables, and this number decides which table gets used. when you're doing direct OGR access, this is the layer name instead. Default:-1output=name[required] β name for output vector mapdistribution=stringβ distribution of perturbation. Options:uniform,normal. Default:uniformparameters=float[,float,...][required] β parameter(s) of distribution. so if the distribution is uniform, you only need ONE parameter, the maximum. for a normal distribution you need TWO, the mean and the standard deviation. periodt β¨minimum=floatβ minimum deviation in map units. Default:0.0seed=integerβ seed value for the random number generator. using the same seed ensures identical results, while a randomly generated seed produces different outcomes in each run. iykyk π«Ά
π 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. iconic behavior fr fr π₯
π 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 to perturb into a ring around the center, the minimum parameter can be used. lowkey so clever πΈ
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 shade, it's just math π
β οΈ output vector points are not guaranteed to be contained within the current geographic region. like, they might just wander off bestie, that's the whole point π
π 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)
latest change: Sunday Jul 27 05:53:30 2025 in commit: da409580ef15011f3bac379c76d41101c9e36347
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
and that's the whole page bestie π this was running on GRASS 8.5.0, Β© 2003-2026 GRASS Development Team, straight outta the GRASS 8.5.0 Reference Manual β slay, go perturb some points, you got this πβ¨π¦
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms