I am working with PostGreSQL
I have 2 data sets: 1) A points layer where each point represents a building. 2) A Polygons layer created from the points layer using convexhull and clusterwithin fonctions to aggregate points in areas.
Now what I am trying to do is calculate the average distance between all points (by area) within a radius of 2 km (my projection is EPSG2950 so i work with meters).
The result should be a new column in my polygon layer with a number that indicates what i stated above.
Any idea how such a request would look like?