by Abel Vázquez
A simple function that brings to PostGIS the classic ESRI's Kernel Density function described at
https://pro.arcgis.com/en/pro-app/tool-reference/spatial-analyst/how-kernel-density-works.htm
and first translated into usable SQL by https://github.com/arredond
NOTE: it only works with points!
How to use it:
WITH
a AS(
SELECT
array_agg(uniqueid) as ids,
array_agg(geom) as geoms
FROM
mydataset
)
SELECT
b.*
FROM
a,
kernel_density(a.ids, a.geoms) b
Thx for the function.
U must change on pgadmin4 this segment...