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-379] Add RS_Base64 #993

Merged
merged 10 commits into from
Sep 1, 2023
Merged

[SEDONA-379] Add RS_Base64 #993

merged 10 commits into from
Sep 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_Base64
  • Remove old RS_Base64

How was this patch tested?

  • Passed added tests.

Did this PR include necessary documentation updates?

  • Yes, I have updated the documentation update.

@@ -470,6 +470,12 @@ class rasteralgebraTest extends TestBaseScala with BeforeAndAfter with GivenWhen
assert(writtenBinary1.length > writtenBinary2.length)
}

it("Passed RS_Base64") {
Copy link
Member

Choose a reason for hiding this comment

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

This is not a correct output of Base64. I believe it should start with "data:PNG". Please double check.

Output:

```
iVBORw0KGgoAAAA...
Copy link
Member

Choose a reason for hiding this comment

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

Fix here as well.

@@ -101,4 +104,11 @@ public static byte[] asArcGrid(GridCoverage2D raster, int sourceBand) {
public static byte[] asArcGrid(GridCoverage2D raster) {
return asArcGrid(raster, -1);
}

public static String asBase64(GridCoverage2D raster) throws IOException {
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 a test in Sedona-common to test it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

BTW, I am adding tests for the other outputs as well. Don't merge rn.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

arc grid test is very slow, I didn't include it. You may merge.

@jiayuasu jiayuasu added this to the sedona-1.5.0 milestone Sep 1, 2023
@jiayuasu jiayuasu merged commit 9327ffd into apache:master Sep 1, 2023
39 checks passed
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