opensearch-project / geospatial

Future home of Geospatial features for OpenSearch
Apache License 2.0
35 stars 36 forks source link

[PROPOSAL] Implement geo-grid query filtering #689

Open chet5619 opened 3 weeks ago

chet5619 commented 3 weeks ago

What kind of business use case are you trying to solve? What are your requirements?

When working with a mapping solution that implements visualization of a geohash, geohex or geotile aggregated shapes a user may want to open a dialog that returns only the aggregated information for a few of the many binning shapes. For example... i may be viewing a map at a scale covering the entire globe, but there may be a hot spot of a few geohash bins that i want to "select" and return just those aggregates.

What is the problem? What is preventing you from meeting the requirements? Currently the only filtering possible for geohash/hex/tile is to use a bounding box to limit the results, and while you can use geohash binning values to get close it is not always the correct information that is returned.

What are you proposing? What do you suggest we do to solve the problem or improve the existing situation? The proposal here is really just to implement a similar capability that can be found in Elasticsearch. https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-grid-query.html The geo-grid query is designed to match the documents that fall inside a bucket of a geogrid aggregation by providing the key of the bucket. And since you can use Boolean query to combine them the number of bins used in the filter is really limitless which makes this implementation more useful than the geo_bounding_box.

chet5619 commented 3 weeks ago

Please also comment if there were any sort of workarounds to this issue as well.

heemin32 commented 2 weeks ago

This is interesting feature. As a workaround, you could try geo polygon or geo shape to limit the result. https://opensearch.org/docs/latest/query-dsl/geo-and-xy/index/

dblock commented 1 day ago

[Catch All Triage - 1, 2, 3, 4]