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

[SEDONA-480] Implement ST_S2ToGeom #1277

Merged
merged 11 commits into from
Mar 13, 2024
Merged

Conversation

furqaankhan
Copy link
Contributor

Did you read the Contributor Guide?

Is this PR related to a JIRA ticket?

What changes were proposed in this PR?

  • Expose the ST_S2ToGeom to public APIs.

How was this patch tested?

  • Passed new and old tests.

Did this PR include necessary documentation updates?

  • Yes, I have updated the documentation update.

@@ -561,6 +561,27 @@ public void getGoogleS2CellIDsAllSameLevel() {
assertEquals(expects, levels);
}

@Test
public void testS2ToGeom() throws ParseException {
Geometry target = GEOMETRY_FACTORY.createPolygon(
Copy link
Member

Choose a reason for hiding this comment

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

Can you clean up all these comments and println?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad, I forgot about them.

@@ -752,6 +752,7 @@ public void test_ST_S2CellIDs() {
"[\n 1153031455769624576,\n 1152961087025446912,\n 1152925902653358080,\n 1152934698746380288,\n 1152943494839402496,\n 1152952290932424704,\n 1152969883118469120,\n 1152978679211491328,\n 1152987475304513536,\n 1152996271397535744,\n 1153005067490557952,\n 1153049047955668992,\n 1153057844048691200,\n 1153040251862646784,\n 1153084232327757824,\n 1153093028420780032,\n 1153066640141713408,\n 1153075436234735616,\n 1153101824513802240,\n 1153137008885891072,\n 1153189785444024320,\n 1153198581537046528,\n 1153172193257979904,\n 1153180989351002112,\n 1153163397164957696,\n 1153128212792868864,\n 1153013863583580160,\n 1153022659676602368,\n 1153242562002157568,\n 1153216173723090944,\n 1153277746374246400,\n 1153207377630068736,\n 1153224969816113152,\n 1153233765909135360,\n 1153268950281224192,\n 1153321726839357440,\n 1153365707304468480,\n 1153374503397490688,\n 1153400891676557312,\n 1153409687769579520,\n 1153383299490512896,\n 1153392095583535104,\n 1153436076048646144,\n 1153444872141668352,\n 1153418483862601728,\n 1153427279955623936,\n 1153453668234690560,\n 1153462464327712768,\n 1153330522932379648,\n 1921361385166471168,\n 1921475734375759872,\n 1921484530468782080,\n 1921493326561804288,\n 1921519714840870912,\n 1921528510933893120,\n 1921537307026915328,\n 384305702186778624,\n 1152389340979003392,\n 1152398137072025600,\n 1152406933165047808,\n 1152873126095224832,\n 1152881922188247040,\n 1152890718281269248,\n 1152917106560335872\n]"
);
}

Copy link
Member

Choose a reason for hiding this comment

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

Please remove this change

@@ -100,4 +100,17 @@ class STS2CellIDs extends TestBaseScala with Matchers with GeometrySample with G
)
}
}

describe("should pass ST_S2ToGeom") {
it("should intersect with the target geometry") {
Copy link
Member

Choose a reason for hiding this comment

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

Please add one more test to show that the result of ST_S2ToGeom can be used in ST_Collect to get a MULTIPOLYGON

@jiayuasu jiayuasu added this to the sedona-1.6.0 milestone Mar 13, 2024
@jiayuasu jiayuasu merged commit eff7a7e into apache:master Mar 13, 2024
49 checks passed
@furqaankhan furqaankhan deleted the ST-S2ToGeom branch July 16, 2024 01:36
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.

None yet

2 participants