Skip to content

Commit fd8a028

Browse files
committed
Fix normalising constant in quartic kernel
Fixes qgis#60616
1 parent 78a1aa9 commit fd8a028

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/analysis/raster/qgskde.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ double QgsKernelDensityEstimation::quarticKernel( const double distance, const d
315315
case OutputScaled:
316316
{
317317
// Normalizing constant
318-
const double k = 116. / ( 5. * M_PI * std::pow( bandwidth, 2 ) );
318+
const double k = 16. / ( 5. * M_PI * std::pow( bandwidth, 2 ) );
319319

320320
// Derived from Wand and Jones (1995), p. 175
321321
return k * ( 15. / 16. ) * std::pow( 1. - std::pow( distance / bandwidth, 2 ), 2 );

0 commit comments

Comments
 (0)