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

Merged
merged 7 commits into from
Oct 24, 2022

Conversation

VijayanB
Copy link
Member

@VijayanB VijayanB commented Oct 24, 2022

Description

This feature introduces new grid system (geohex_grid) for aggregation based on geo_point.

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.

VijayanB and others added 7 commits September 30, 2022 10:53
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

Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
Remove usage of deprecated BaseNodeRequest

Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
H3 version 1 has 16 resolutions, numbered 0 through 15.
Introduced a constant to represent min value, similar
to max value.

Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
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>
Included integration test for geohex_grid.

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

Codecov Report

Merging #179 (9c6c524) into main (4465452) will increase coverage by 0.51%.
The diff coverage is 88.04%.

@@             Coverage Diff              @@
##               main     #179      +/-   ##
============================================
+ Coverage     84.64%   85.16%   +0.51%     
- Complexity      332      377      +45     
============================================
  Files            44       52       +8     
  Lines          1094     1186      +92     
  Branches         97       98       +1     
============================================
+ Hits            926     1010      +84     
- Misses          128      135       +7     
- Partials         40       41       +1     
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%> (ø)
...earch/geospatial/index/mapper/xypoint/XYPoint.java 74.13% <0.00%> (+5.17%) ⬆️

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

@VijayanB VijayanB self-assigned this Oct 24, 2022
@VijayanB VijayanB added v2.4.0 'Issues and PRs related to version v2.4.0' geospatial labels Oct 24, 2022
Copy link
Collaborator

@navneet1v navneet1v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving.
Please add all the related PR in the description of this PR. So that we know all the related PRs which got approved.

@VijayanB
Copy link
Member Author

Approving. Please add all the related PR in the description of this PR. So that we know all the related PRs which got approved.

Ack

@VijayanB VijayanB merged commit efeff96 into opensearch-project:main Oct 24, 2022
VijayanB added a commit to VijayanB/geospatial that referenced this pull request Oct 26, 2022
…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 added a commit that referenced this pull request Oct 26, 2022
)

* Import h3 library (#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 (#164)

Remove usage of deprecated BaseNodeRequest

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

* Introduce H3 min resolution constant (#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 (#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 (#176)

Included integration test for geohex_grid.

Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
@VijayanB VijayanB removed the v2.4.0 'Issues and PRs related to version v2.4.0' label Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants