Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Documentation for geohex_grid over geo_shape #92999
Documentation for geohex_grid over geo_shape #92999
Changes from 1 commit
56eec68
220d33c
97ceb7d
52c95c8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the reason is that Elasticsearch (more in particular, lucene) treats edges using the equirectangular projection at search time, therefore the mismatch between the query result and the aggregation might provided surprising results.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case we should do this with points too, right? I know we cannot change points due to backwards compatibility, but it might be nice to have an explanation for doing the two differently.
Of course with points we have less risk due to only the cells having edges, while with shapes we have edges for both the shapes and the H3 cells, increasing the likelihood of something looking weird. But that does not seem like sufficient reason to use spherical for points.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main issue is that we accept edges (polygons and lines) that cannot be represented in spherical coordinates (edges > 180 degrees). This alone makes impossible to resolve geo_shape aggregations using spherical geometry.
Note that we use equirectangular projection but maps are normally using mercator projection, so there is already a mismatch there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Understood. I used your initial explanation, and decided not to involve the visual artefact discussion at all. Also, the question of edges > 180 degrees could, presumably, be solved with sidedness (and orientation), but I understand from previous discussions we have a backwards compatibility issue there. So I simplified and did not bring that up here either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! that's makes more sense to me.