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

Shape-related Painless functions #36439

Open
Destroy666x opened this issue Dec 10, 2018 · 6 comments
Open

Shape-related Painless functions #36439

Destroy666x opened this issue Dec 10, 2018 · 6 comments
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes >enhancement high hanging fruit Meta Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)

Comments

@Destroy666x
Copy link

Describe the feature: It would be nice to have some scripting functions for shape-related checks - like if the document's shape intersects a shape passed as an argument or if a point is within a shape.

@polyfractal polyfractal added >enhancement :Analytics/Geo Indexing, search aggregations of geo points and shapes labels Dec 10, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo

@imotov
Copy link
Contributor

imotov commented Dec 11, 2018

In what context would such functions be used?

@Destroy666x
Copy link
Author

Custom scripts e.g. to obtain score for area detection.

@imotov
Copy link
Contributor

imotov commented Dec 12, 2018

That might be quite inefficient unless we add doc values support support for geo_shapes, which is something we would like to do for other reasons. So, we should probably revisit this after #32039.

@imotov imotov added the stalled label Dec 12, 2018
@imotov
Copy link
Contributor

imotov commented Jan 7, 2019

Depends on #37206

@rjernst rjernst added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label May 4, 2020
@nknize
Copy link
Contributor

nknize commented Jul 8, 2020

This is definitely something we want to be able to support in the future as it adds value to Geo SQL. There are still quite a few dependencies and unknowns, however, that need to be addressed before we can begin listing out and planning those ST_ functions we want to / can support:

  1. geo_shape doc values is now supported, but we don't yet have a way of recreating the shape to begin computing geometry attributes (e.g., area, perimeter, overlap)
  2. we currently only support WGS84 decimal degrees (which means area calculations will be incorrectly computed in decDegress^2); there is an open issue to add support for alternative projections, which will need to be supported to correctly compute area
  3. We are currently working on other features that could make this doable and more efficient, but they are still a ways away before we can start addressing this feature.

I am marking this as high hanging fruit and converting into a meta issue so we can start tracking the dependencies, and progress.

In the meantime, it would be useful to start listing those functions that are of most interest to our user base. I'll start:

  • ST_AREA
  • ST_PERIMETER
  • ST_DISTANCE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes >enhancement high hanging fruit Meta Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)
Projects
None yet
Development

No branches or pull requests

7 participants
@rjernst @imotov @nknize @polyfractal @Destroy666x @elasticmachine and others