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

Support Uber's H3 geospatial indexing system as geohex_grid (#179) #180

Merged
merged 1 commit into from
Oct 26, 2022

Conversation

VijayanB
Copy link
Member

Description

This PR is back port of #179 . However, in 3.x, Aggregation base class like InternalGeoXxxx were refactored. Hence, we have to use old class as base class for 2.x branch.

Issues Resolved

#98

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…ch-project#179)

* Import h3 library (opensearch-project#154)

Made following changes to make it compatible:
1. Rename package from elasticsearch to opensearch.geospatial
2. Update License headers
3. Update build file
4. Update settings to include sub projects

* Use Transport Request (opensearch-project#164)

Remove usage of deprecated BaseNodeRequest

* Update http client package to resolve build failure (opensearch-project#168) (opensearch-project#171)

* Introduce H3 min resolution constant (opensearch-project#165)

H3 version 1 has 16 resolutions, numbered 0 through 15.
Introduced a constant to represent min value, similar
to max value.

* Add geohex aggregation (opensearch-project#160)

This aggregation will use uber's h3 to group coordinates into H3 cell.
Created new aggregation type geohex_grid. The precision will be between
0 and 15. This aggreation has default precision as 5,
similar to geohash and geotile.

Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>

* Add integration test (opensearch-project#176)

Included integration test for geohex_grid.

Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
@VijayanB VijayanB requested a review from a team October 26, 2022 01:52
@codecov-commenter
Copy link

codecov-commenter commented Oct 26, 2022

Codecov Report

Merging #180 (dcb2b40) into 2.x (bfaba9c) will increase coverage by 0.25%.
The diff coverage is 88.04%.

@@             Coverage Diff              @@
##                2.x     #180      +/-   ##
============================================
+ Coverage     84.73%   84.99%   +0.25%     
- Complexity      332      376      +44     
============================================
  Files            44       52       +8     
  Lines          1094     1186      +92     
  Branches         97       98       +1     
============================================
+ Hits            927     1008      +81     
- Misses          128      137       +9     
- Partials         39       41       +2     
Impacted Files Coverage Δ
...arch/aggregations/bucket/geogrid/GeoHexHelper.java 75.00% <75.00%> (ø)
...s/bucket/geogrid/GeoHexGridAggregationBuilder.java 76.00% <76.00%> (ø)
...search/aggregations/bucket/geogrid/GeoHexGrid.java 90.90% <90.90%> (ø)
...opensearch/geospatial/plugin/GeospatialPlugin.java 92.85% <100.00%> (+1.94%) ⬆️
...regations/bucket/geogrid/GeoHexGridAggregator.java 100.00% <100.00%> (ø)
...ns/bucket/geogrid/GeoHexGridAggregatorFactory.java 100.00% <100.00%> (ø)
.../aggregations/bucket/geogrid/GeoHexGridBucket.java 100.00% <100.00%> (ø)
.../aggregations/bucket/geogrid/ParsedGeoHexGrid.java 100.00% <100.00%> (ø)
...gations/bucket/geogrid/ParsedGeoHexGridBucket.java 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@martin-gaievski
Copy link
Member

We probably need 2.4 label for this PR

@VijayanB VijayanB added the v2.4.0 'Issues and PRs related to version v2.4.0' label Oct 26, 2022
@VijayanB VijayanB merged commit 953337b into opensearch-project:2.x Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature v2.4.0 'Issues and PRs related to version v2.4.0'
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants