Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use geo-centroid aggregator for geo-hash grids #5464

Closed
clintongormley opened this issue Nov 22, 2015 · 11 comments
Closed

Use geo-centroid aggregator for geo-hash grids #5464

clintongormley opened this issue Nov 22, 2015 · 11 comments
Labels
Feature:Coordinate Map Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:enhancement WIP Work in progress

Comments

@clintongormley
Copy link
Contributor

The newly added (elastic/elasticsearch#13846) geo-centroid metric aggregator calcuates where, in a single geo-hash cell, the majority of geo-points are located. This will give a much more natural heat map etc than exists today.

@rashidkpc
Copy link
Contributor

Yay! Thanks for the update, super exited thats available now!

@rashidkpc
Copy link
Contributor

Hrm, just noticed this was implemented as a metric aggregation instead of the original method. Unfortunately it doesn't fit well with our model. Going to have to back burner this until we figure out a nice way to make it fit

@rashidkpc rashidkpc removed the v4.4.0 label Nov 23, 2015
@spalger
Copy link
Contributor

spalger commented Nov 23, 2015

Aggs can actually create their own sub-aggs (this is how we support custom sorting by agg).

@philbb
Copy link

philbb commented Dec 23, 2015

I would love to see this implemented. Let me know if I can help with making it happen.

@nknize
Copy link
Contributor

nknize commented Feb 9, 2016

@spalger is it easy enough for you to add geo_centroid as a sub aggregator to geohash_grid or do we need to consider reopening elastic/elasticsearch#13912? I'd prefer not reopen, but having this feature blocked may provide enough reason to add the optional geo_centroid parameter back to geohash_grid. If its enough of a pain for our kibana team it will be more of a pain for the community? /cc @clintongormley

@mbertani
Copy link

mbertani commented Sep 8, 2016

I am a bit confused by this thread, is there a way to use geo_centroid with the tile map visualization in Kibana already? Or are they using something else than Kibana to render the map in this presentation in section GeoCentroid Agg (almost at the end). Whatever I try adding as a json input to a tile map in Kibana, I get the code inside the geohash_grid definition, and not as a subaggregation. And the geo_centroid bit is ignored.

@nknize
Copy link
Contributor

nknize commented Sep 8, 2016

I don't think geo_centroid is being used in kibana yet? @epixa would know more.

@epixa
Copy link
Contributor

epixa commented Sep 8, 2016

@nknize That is correct, we do not currently use geo_centroid in Kibana.

@mbertani
Copy link

mbertani commented Sep 8, 2016

Ok, thanks for the feedback! Looking forward to having this feature available in kibana.

@tbragin tbragin added Feature:Coordinate Map Feature:Visualizations Generic visualization features (in case no more specific feature label is available) labels Nov 1, 2016
@JacobBrandt
Copy link
Contributor

JacobBrandt commented Dec 28, 2016

Maybe I'm missing something but why can't we just create a new metric aggregation for this feature? Then people can add it to their visualizations however they want. I played around and created a new metric aggregation type. I then modified the geo json aggregation response code to check for this aggregation and change the geometry coordinates for the returned feature point to the centroid if it existed otherwise the coordinates remain the same like before and come from the geo hash.

So now if you want the geo_centroid aggregation metric you have to add the metric in the visualization which I think makes sense. Here I changed a tile map that I use to include it as a metric.
screen shot 2016-12-28 at 2 47 04 pm
screen shot 2016-12-28 at 2 47 14 pm
screen shot 2016-12-28 at 2 47 29 pm

And now my circle markers are positioned based on the geo centroid of each bucket instead of the center of the geo hash grid.
centroid-zoom

@thomasneirynck
Copy link
Contributor

We're planning to make this the new default behavior for Kibana. We'll introduce this functionality as part of a larger map enhancement effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Coordinate Map Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:enhancement WIP Work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants