-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Query by width/height or area of a geo-shape #54218
Comments
Pinging @elastic/es-analytics-geo (:Analytics/Geo) |
The ask makes sense to me. It might be useful to include it in a query that gets all shapes that are bigger than a certain minimum threshold and within given geo bounds. |
This was discussed in the full stack geo meeting. One way to do this would be to have something in Lucene akin to term vectors but for spatial geometries. At index time we compute the area, perimeter, etc of tessellated triangles and store them in a spatial term vector. Having this granularity would make it easier for us to compute things like area overlap, or geometric clipping, as we would be doing this on the individual triangle. A shorter / "easier" solution might be to offer a |
With the introduction of painless support for geo_shape fields on #72886, this can now be achieved by using runtime fields. For example:
The computation of distances is left to the user as that can be done in several ways. |
When running a
_search
for individual documents, it would be useful if ES could filter out documents where itsgeo_shape
are smaller than a given size. (e.g. ideally by width/height in webmercator meters, but lat/lon delta could work as well).The reason for this is that often times a client issues an ES-query in order to display the shapes at a given scale. If that scale is small enough (ie. zoomed out), features smaller than a pixel do not need to be included.
Including in the search-result documents that the recipient then will filter out, adds noise to the ES-response. These unnecessary documents also count to the
index.max_result_window
search limit, potentially hiding less relevant results.This would be relevant for the Kibana Maps application, since it performs scale-based queries. This is especially relevant for vector-tiling of ES search-results (elastic/kibana#58519). When features are too small, they will be omitted from the tile anyway.
@giladgal @nknize @alexfrancoeur
The text was updated successfully, but these errors were encountered: