Clustering geo data in mongodb Clustering geo data in mongodb mongodb mongodb

Clustering geo data in mongodb


In MongoDB, a geoHaystack index has another purpose - it is a special index that is optimized to return results over small areas. I think it can't be used here.

So, I think you can retrieve all points and do clustering using k-means. That should be fast. After that you can save them as another entities (e.g. Polygon) and use it anywhere you need.