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-336] Add RS_UpperLeftX and RS_UpperLeftY #935

Merged
merged 13 commits into from
Aug 1, 2023

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_UpperLeftX and RS_UpperLeftY

How was this patch tested?

  • Add new tests

Did this PR include necessary documentation updates?

val df = sparkSession.read.format("binaryFile").load(resourceFolder + "raster/test1.tiff")
val result = df.selectExpr("RS_UpperLeftX(RS_FromGeoTiff(content))").first().getDouble(0)
val expected: Double = -1.3095817809482181E7
assertEquals(expected, result, 1e12)
Copy link
Contributor

Choose a reason for hiding this comment

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

This will allow a difference of 10^12 while asserting equals. I think you mean 1e-12 which is 10^-12

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for pointing it out.

val df = sparkSession.read.format("binaryFile").load(resourceFolder + "raster/test1.tiff")
val result = df.selectExpr("RS_UpperLeftY(RS_FromGeoTiff(content))").first().getDouble(0)
val expected: Double = 4021262.7487925636
assertEquals(expected, result, 1e8)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, I believe this is supposed to be 1e-8

@jiayuasu jiayuasu added this to the sedona-1.5.0 milestone Aug 1, 2023
@jiayuasu jiayuasu merged commit b90dd6b into apache:master Aug 1, 2023
39 checks passed
@furqaankhan furqaankhan deleted the upperleftXRaster branch August 1, 2023 18:54
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