v.decimate(1grass)
π¦ v.decimate β the manual page, bestie edition β¨
okay so you know the GRASS User's Manual? this is one of its pages, v.decimate(1grass), and it's genuinely iconic for anyone drowning in point cloud data π
πΈ NAME πΈ
v.decimate β decimates a point cloud π«Ά
Basically: it copies points from one vector to another while applying different decimations. That's the whole vibe. β¨
π KEYWORDS π
vector, LIDAR, generalization, decimation, extract, select, points, level1
π SYNOPSIS π
v.decimate
v.decimate --help
v.decimate [-gfczxbt] input=name [layer=string] output=name
[zrange=min,max] [cats=range] [skip=integer] [preserve=integer]
[offset=integer] [limit=integer] [zdiff=float]
[cell_limit=integer] [--overwrite] [--help] [--verbose] [--quiet]
[--ui]
β¨ Flags β¨
-gβ apply grid-based decimation π-fβ use only the first point in a grid cell during grid-based decimation-cβ only one point percatin a grid cell-zβ use z in grid decimation-xβ store only the coordinates, throw away categories (do not store any categories even if they're present in the input data)-bβ do not build topology. This one is advantageous when you're handling a large number of points π₯-tβ do not create attribute table--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 π¦
input=name[required] β name of input vector map, or 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 determines which table to use. When used with direct OGR access, this is the layer name. Default:-1output=name[required] β name for output vector mapzrange=min,maxβ filter range for z data (min,max)cats=rangeβ category values. Example:1,3,7-9,13skip=integerβ throw away every n-th point. For example,5will import 80 percent of points. If not specified, all points are copiedpreserve=integerβ preserve only every n-th point. For example,4will import 25 percent of points. If not specified, all points are copiedoffset=integerβ skip first n points. Skips the given number of points at the beginning.limit=integerβ copy only n points. Copies only the given number of pointszdiff=floatβ minimal difference of z values. Minimal difference between z values in grid-based decimationcell_limit=integerβ preserve only n points per grid cell. Preserves only the given number of points per grid cell in grid-based decimation
π DESCRIPTION π
v.decimate reduces the number of points in the input vector map and copies them over to the output vector map. You can apply different point decimation techniques to shrink that point count. no cap.
Two main decimation techniques are:
- count-based decimation (the
skip,preserve,offsetandlimitoptions) - grid-based decimation (the
-gflag)
The grid-based decimation will remove points based on:
- similar z coordinates (the
-zflag and thezdiffoption) - same categories (the
-cflag) - count of points (the
-fflag and thecell_limitoption)
The grid-based decimation is currently using a 2D grid, so the points are placed and compared within this 2D grid. The comparison can happen using z coordinates or categories. Note that although the grid is only 2D, the module works with 3D points. yes bestie, 3D points, 2D grid, it's giving chaos but it works π
The grid-based decimation extent and resolution depend on the current computational region as set by g.region. As a consequence, the output is limited only to the computational region in this case.
TODO: Currently, any output is limited by the region.
The count-based decimation result highly depends on how the data are ordered in the input. This applies especially to the offset and limit options where the resulting shape and densities can be surprising π. The options skip and preserve are influenced by the order of points in a similar way but they usually keep relative density of points (which may or may not be desired). On the other hand, the grid-based decimation will generally result in more even density of output points (see Figure 1). π«Ά
Besides decimation, point count can be reduced by applying different selections or filters, these are:
- selection by category (the
catsoption) - selection by z values (the
zrangeoption)
π₯ NOTES π₯
The grid-based decimation requires all points which will be saved in output to fit into the computer's memory (RAM). It is advantageous to have the region only in the area with the points, otherwise unnecessary memory is allocated. Higher (finer) resolutions and higher amount of preserved points per cell require more memory. The count-based decimation has no limitation regarding the available memory. π (grid mode said "RAM check", fr)
Significant speed up can be gained using the -b flag which disables building of topology for the output vector map. This may limit the use of the vector map by some modules, but for example, this module works without topology as well. slay. β¨
π EXAMPLES π
Keep only every forth point, throw away the rest:
v.decimate input=points_all output=points_decimated_every_4 preserve=4
Keep only points within a grid cell (given by the current computational region) which has unique categories (e.g. LIDAR classes):
v.decimate input=points_all output=points_decimated_unique_cats layer=1 -g -c
Figure 1: Comparison of original points, decimation result with every forth point preserved, and grid-based decimation result with points with unique categories in each grid cell
Keep only points with category 2 and keep only approximately 80% of the points:
v.decimate input=points_all output=points_decimated_ skip=5 cats=2 layer=1
π§ REFERENCES π§
- Petras, V., Petrasova, A., Jeziorska, J., Mitasova, H. (2016). Processing UAV and LiDAR point clouds in grass GIS. The International Archives of Photogrammetry, Remote Sensing and Spatial Information Sciences, 41, 945 (DOI)
π SEE ALSO π
v.extract, v.outlier, v.select, v.category, v.build, v.in.pdal, g.region
πΈ AUTHOR πΈ
Vaclav Petras, NCSU GeoForAll Lab
β SOURCE CODE β
Available at: v.decimate source code (history)
Latest change: Friday Apr 17 01:04:26 2026 in commit: 32a143358df26b2e518b03c7e0d79541e8d1e5b1
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
and that's the whole page, bestie!! π thanks for reading, this was GRASS 8.5.0, part of the Β© 2003-2026 GRASS Development Team's GRASS 8.5.0 Reference Manual πβ¨ go decimate some point clouds, 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