Geo-points Bucket Aggregation based on density rather than geohash

HI,

I've got large set of documents containing coordinates. I want to present them on a map having limited number of pins - so I need certain aggs to do that. I can do this doing geo-hash aggregation, however it doeasn't look very good - you get "vartical lines of pins" due to setting them in the center of a geo hash box. I would like to have them aggregated in respect to density / distance between pins. Can I do that with ES?

have you seen the geo_centroid aggregation?

Hi, thanks for answering!

Yes, I did - but it requiers specifing a center point, and aggregates depending on distance from this one point. What i want to achive is having those point chosen by density in a way. Like with geohash, but so that you don't have fixed cells from this hash grid, but they are in areas with certain density of points.

no, it does not. You are talking about the geo distance aggregation, I was talking about the geo centroid aggregation. They are two different things.

yes, sorry, you're right - I confused those two.
However centroid still doesn't seem to be doing what I need - or maybe I'm doing something wrong. It finds the middle for given set of points, but to get more than one, you need to combine it with buckets of some kind - finding those buckets seems to be the problem for me. I'd like them do be defined by proximity / density.

I've got around 40k points for the whole country. I'd like to aggragate them in respect to density. centroid will calculate center of given bucket, but how I can define them? In example from docs, theres grouping by city name, but given city is not always most dense place, and if someone zooms in into the city it stops working at all.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.