v.decimate(1)

πŸ’– v.decimate β€” the manual, but make it cute πŸ’–

okay bestie, welcome to v.decimate(1) from the GRASS GIS User's Manual ✨ this is the one that decimates a point cloud β€” like, it copies points from one vector map to another while applying different decimations. slay.


🌈 NAME 🌈

v.decimate β€” decimates a point cloud πŸ’…

It copies points from one vector to another while applying different decimations. yes, it's giving "spring cleaning but for points."


🏷️ 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 🧚 the grid era begins.
  • -f β€” Use only first point in grid cell during grid-based decimation. first come, first served, periodt.
  • -c β€” Only one point per cat in grid cell 🐱 (cat = category, not the animal, but the energy is the same).
  • -z β€” Use z in grid decimation.
  • -x β€” Store only the coordinates, throw away categories. Do not store any categories even if they are present in input data. bye categories, you will not be missed πŸ™ˆ
  • -b β€” Do not build topology. Advantageous when handling a large number of points πŸ”₯
  • -t β€” Do not create attribute table.
  • --overwrite β€” Allow output files to overwrite existing files. chaotic but authorized πŸ’€
  • --help β€” Print usage summary.
  • --verbose β€” Verbose module output (it WILL tell you everything).
  • --quiet β€” Quiet module output (it will NOT tell you anything).
  • --ui β€” Force launching GUI dialog πŸŽ€

πŸŽ€ Parameters πŸŽ€

  • input=name [required] β€” Name of input vector map. Or 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. 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 πŸ’–
  • zrange=min,max β€” Filter range for z data (min,max).
  • cats=range β€” Category values. Example: 1,3,7-9,13.
  • skip=integer β€” Throw away every n-th point. For example, 5 will import 80 percent of points. If not specified, all points are copied.
  • preserve=integer β€” Preserve only every n-th point. For example, 4 will import 25 percent of points. If not specified, all points are copied.
  • offset=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 points.
  • zdiff=float β€” Minimal difference of z values. Minimal difference between z values in grid-based decimation.
  • cell_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. Different point decimation techniques can be applied to reduce the number of points. it's basically a glow-up but in reverse β€” fewer points, same main character energy ✨

Two main decimation techniques are:

  • count-based decimation (the skip, preserve, offset and limit options)
  • grid-based decimation (the -g flag)

The grid-based decimation will remove points based on:

  • similar z coordinates (the -z flag and the zdiff option)
  • same categories (the -c flag)
  • count of points (the -f flag and the cell_limit option)

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. it's giving "2D brain, 3D body," and honestly? relatable 😭

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 skip and preserve options are influenced by 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 cats option)
  • selection by z values (the zrange option)

πŸ“ 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 a higher amount of preserved points per cell require more memory. The count-based decimation has no limitation regarding the available memory. no cap, count-based is the low-maintenance bestie here 🫢

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.


🌟 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)

Accessed: Saturday Jan 17 05:41:20 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


and that's the whole page bestie πŸ’… that footer energy β€” GRASS GIS 8.4.2, manual accessed Saturday Jan 17 05:41:20 2026, Β© 2003-2025 GRASS Development Team β€” iconic, no notes. now go decimate some points, you got this πŸŽ€βœ¨

πŸ“¦ where this page comes from