Skip to content

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
@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