[Docs] Problems with using geocentroid for multi-valued geo_points #50799
Labels
[Deprecated-Use Team:Presentation]Team:Geo
Former Team Label for Geo Team. Now use Team:Presentation
Team:Docs
Some elastic behaviour bit me, I think a warning in the documentation would be fair:
When making a geohash, elastic aggregates different documents into buckets, not the individual
geo_points
This means that a bucket can contain a document with points both inside and outside this bucket. Now when calculating the gecentroid, all points are considered, also those outside of the bucket boundary.
Consider this example:
The result gives us 2 buckets, both with the same geo_centroid at longitude 45.
The same happens when making a coordinate map in Kibana, although luckily Kibana is smart enough to not allow the point to be drawn outside of the box. However, it's clearly visible that our (0,0) point is drawn eastwards and our (0, 90) points dragged westwards.
The very best solution would obviously be to have the geo_centroid only consider those point that are actually inside the bucket, but I don't think that's feasible.
But for now, I think the documentation about this could be clearer.
My suggestion: ong https://www.elastic.co/guide/en/kibana/7.4/tilemap.html (and those for other versions) has under the "buckets" header the following text, and I propose to add the text with italics:
The place markers off grid (use geocentroid) box is checked by default. When this box is checked, the markers are placed in the center of all the documents in that bucket. When unchecked, the markers are placed in the center of the geohash grid cell. Leaving this checked generally results in a more accurate visualization. However, it may lead to decreased accuracy when you have multiple values in your specified geo_point, as this makes it impossible to calculate the right geo_centroid.
Kibana version:: 7.3.1
Elasticsearch version:: 7.3.1
Server OS version: Windows 10
Browser version: Chrome (latest)
Browser OS version: Windows 10
Original install method (e.g. download page, yum, from source, etc.): Downloaded
And I think this issue could both be improved in Kibana-docs and the documentation in Elasticsearch, so I'm filing an issue there as well (elastic/elasticsearch#49189).
The text was updated successfully, but these errors were encountered: