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-354] Add RS_SkewX and RS_SkewY #960

Merged
merged 7 commits into from
Aug 12, 2023
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?

  • Add RS_SkewX and RS_SkewY

How was this patch tested?

  • Add new tests (java and spark sql)

Did this PR include necessary documentation updates?

Spark SQL Exmaple:

```sql
SELECT RS_SkewX(raster) FROM rasters
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 use MakeEmptyRaster as the input?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure.

@jiayuasu
Copy link
Member

@iGN5117 Can you please review?

@Test
public void testSkewX() throws FactoryException {
GridCoverage2D emptyRaster = RasterConstructors.makeEmptyRaster(10, 2, 4, 6, 4, 1, 1, 2, 7, 0);
assertEquals(2, RasterAccessors.getSkewX(emptyRaster), 0.1d);
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add tests testing the convenience constructor of MakeEmptyRaster with 0 skews

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay

Spark SQL Exmaple:

```sql
SELECT RS_SkewY(raster) FROM rasters
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use RS_MakeEmptyRaster in SQL examples so that the skew of the created raster in visible as well

@jiayuasu jiayuasu merged commit 4dad249 into apache:master Aug 12, 2023
39 checks passed
@furqaankhan furqaankhan deleted the skewxy branch August 14, 2023 13:57
Kontinuation pushed a commit to Kontinuation/sedona that referenced this pull request Oct 11, 2024
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.

3 participants