v.kernel(1grass)
π v.kernel π
okay bestie, welcome to v.kernel from the GRASS User's Manual β she's a vector girlie who generates raster density maps from point maps, and she's so good at it. Density gets computed with a moving kernel, obviously, and if you're feeling spicy she can also spit out a vector density map on a vector network. π¦
KEYWORDS: vector, kernel density, point density, heatmap, hotspot π₯
β¨ SYNOPSIS β¨
v.kernel
v.kernel --help
v.kernel [-oqnm] input=name [net=name] [output=name]
[net_output=name] radius=float [dsize=float] [segmax=float]
[distmax=float] [multiplier=float] [node=string] [kernel=string]
[--overwrite] [--help] [--verbose] [--quiet] [--ui]
π Flags
-oβ try to calculate an optimal radius with givenβradiusβtaken as maximum (experimental, so likeβ¦ be aware π)-qβ only calculate the optimal radius and exit (no map is written, she's just doing math and leaving)-nβ in network mode, normalize values by sum of density multiplied by length of each segment. Integral over the output map then gives1.0 * multiplierβ¨-mβ in network mode, multiply the result by number of input points--overwriteβ allow output files to overwrite existing files (yes the old ones, gone, bye π)--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 with training pointsnet=nameβ name of input network vector mapoutput=nameβ name for output raster mapnet_output=nameβ name for output vector density map. Outputs vector map if network map is givenradius=float[required] β kernel radius in map unitsdsize=floatβ discretization error in map units. Default:0.segmax=floatβ maximum length of segment on network. Default:100.distmax=floatβ maximum distance from point to network. Default:100.multiplier=floatβ multiply the density result by this number. Default:1.node=stringβ node method. Options:none,split. Default:nonenone: no method applied at nodes with more than 2 arcssplit: equal split (Okabe 2009) applied at nodes
kernel=stringβ kernel function. Options:uniform,triangular,epanechnikov,quartic,triweight,gaussian,cosine. Default:gaussian
π DESCRIPTION π
So v.kernel generates a raster density map from vector points data using a moving kernel. The available kernel density functions are uniform, triangular, epanechnikov, quartic, triweight, gaussian, cosine. The default function is gaussian β she's the main character, obvi. π
The module can also generate a vector density map on a vector network. Here's the tea though: conventional kernel functions produce biased estimates by overestimating the densities around network nodes, whereas the equal split method of Okabe et al. (2009) produces unbiased density estimates. The equal split method uses the kernel function selected with the kernel option and can be enabled with node=split. periodt.
π NOTES π
The multiplier option is needed to overcome the limitation that the resulting density in case of a vector map output is stored as category (integer). The density result stored as category may be multiplied by this number.
For the gaussian kernel, standard deviation for the gaussian function is set to 1/4 of the radius. no cap.
With the -o flag (experimental, bestie, we said it) the command tries to calculate an optimal radius. The value of radius is taken as maximum value. The radius is calculated based on the gaussian function, using ALL points, not just those in the current region. all of them. every single one. π
π EXAMPLES π
Compute density of points (using vector map of schools from North Carolina sample dataset):
g.region region=wake_30m
v.kernel input=schools_wake output=schools_density radius=5000 multiplier=1000000
r.colors map=schools_density color=bcyr
School density. ate. π₯
π KNOWN ISSUES π
The module only considers the presence of points, but not (yet) any attribute values. ngl she's just vibing with locations, not your data.
π REFERENCES π
- Okabe, A., Satoh, T., Sugihara, K. (2009). A kernel density estimation method for networks, its computational method and a GIS-based tool. International Journal of Geographical Information Science, Vol 23(1), pp. 7-32. DOI:
10.1080/13658810802475491
π SEE ALSO π
v.surf.rst
Overview: Interpolation and Resampling in GRASS
π«Ά AUTHORS π«Ά
- Stefano Menegon, ITC-irst, Trento, Italy
- Radim Blazek (additional kernel density functions and network part)
β SOURCE CODE β
Available at: v.kernel 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
okay that's the whole page bestie, ily, go make some heatmaps πΈ and just so you know β this was the GRASS 8.5.0 Reference Manual, Β© 2003-2026 GRASS Development Team, running under GRASS 8.5.0. slay πβ¨
π¦ 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