Skip to content

Conversation

@iverase
Copy link
Contributor

@iverase iverase commented Dec 14, 2021

Adds a new lib project that contains the port to Java of basic functionality of the bar H3 library. The main functionality proved is:

  • geoToH3(double lat, double lng, int res) : Given point and a resolution, it returns the h3 cell the point belongs to.
  • geoToH3Address(double lat, double lng, int res): Given point and a resolution, it returns the h3 address the point belongs to.
  • h3ToGeoBoundary(long h3): Given an h3 cell, it returns the Cell boundary
  • h3ToGeoBoundary(String h3Address): Given an h3 address, it returns the Cell boundary
  • h3ToChildren(long h3): Given an h3 cell, it returns the children cell
  • h3ToChildren(String h3Address): Given an h3 address, it returns the children addresses.
  • h3ToParent(long h3): Given an h3 cell, it returns the parent cell
  • h3ToParent(String h3Address): Given an h3 address, it returns the parent address
  • hexRing(long h3): Given an h3 cell, it return all neighbour cells.
  • hexRing(String h3Address): Given an h3 address, it return all neighbour addresses.

@iverase iverase added >enhancement :Delivery/Build Build or test infrastructure :Analytics/Geo Indexing, search aggregations of geo points and shapes v8.1.0 labels Dec 14, 2021
@iverase iverase requested a review from imotov December 14, 2021 10:20
@elasticmachine elasticmachine added Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) Team:Delivery Meta label for Delivery team labels Dec 14, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (Team:Analytics)

// Vendored Code
matchers.add(subStringMatcher("VEN ", "Vendored", "@notice"));
// Uber h3 port
matchers.add(subStringMatcher("H3 ", "Vendored", "Based on the h3 project by Uber (@uber)"));
Copy link
Contributor Author

@iverase iverase Dec 14, 2021

Choose a reason for hiding this comment

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

added this to make precommit happy .

@@ -0,0 +1,42 @@
/*
* Based on the h3 project by Uber (@uber)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure this header text is going to be enough:

  (c) You must retain, in the Source form of any Derivative Works
      that You distribute, all copyright, patent, trademark, and
      attribution notices from the Source form of the Work

I think we need to include the original source header text here, with the addition of a line mentioning we modified the code.

@@ -0,0 +1,203 @@
This file is based on a modification of https://github.com/uber/h3, which is licensed under the Apache 2.0 license.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be a copy of the original NOTICE file?

Copy link
Contributor

@imotov imotov left a comment

Choose a reason for hiding this comment

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

LGTM

@iverase
Copy link
Contributor Author

iverase commented Dec 15, 2021

@elasticmachine update branch

@iverase
Copy link
Contributor Author

iverase commented Jan 24, 2022

@elasticmachine update branch

@iverase iverase added auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) and removed auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) labels Jan 24, 2022
@iverase iverase merged commit 93d041d into elastic:master Jan 24, 2022
@iverase iverase deleted the h3 branch January 24, 2022 07:48
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 :Delivery/Build Build or test infrastructure >enhancement Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) Team:Delivery Meta label for Delivery team v8.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants