I have a data set with over 1 million points. I need to find location for polygons (circle) that will maximise the number of points within it.
- Radius of the circle depends on where the centre of the circle lies (different areas will have different radii)
- Some points may have over 5000 neighbours within the circle, so solution will need to manage the size of the data (and connections found)
- If this makes analysis easier, points in one circle may not lie in another circle (i.e. circles don't overlap)
- There are no limits on how many circles can be made
I originally tried to centre the circles on the points themselves so I can run it through a loop, but ideally I'd like to maximise the points wherever it lies.
My previous attempt included looking at number of points within radius (relationships) from each point so that I can order them DESC of density, and for the highest density remove its child points from other relationships. Then using the next biggest density and so on.. This seems very inefficient (size of the interim data became too big and slow).
I have a feeling using PostGIS or raster type solutions will be best suited for this? Can anyone please throw some light?