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-325] Fix resource leaks in raster constructors RS_FromGeoTiff and RS_FromArcInfoAsciiGrid #903

Merged

Conversation

Kontinuation
Copy link
Member

Did you read the Contributor Guide?

Is this PR related to a JIRA ticket?

What changes were proposed in this PR?

We've implemented an ImageInputStream backed by byte-array, which prevents GeoTiffReader from wrapping the input InputStream with a file-backed cached input stream. Now the GridCoverage2D will be entirely backed by memory blobs and no file-io should be involved.

We may also need to dispose the GridCoverage2D object after usage, though now this dispose call become optional. We'll add raster support to InferredExpression so that we can dispose raster objects uniformly.

How was this patch tested?

Passes existing raster tests.

Did this PR include necessary documentation updates?

  • No, this PR does not affect any public API so no need to change the docs.

@Kontinuation Kontinuation marked this pull request as ready for review July 14, 2023 05:53
@jiayuasu jiayuasu added this to the sedona-1.5.0 milestone Jul 14, 2023
@jiayuasu jiayuasu merged commit 9108472 into apache:master Jul 14, 2023
29 of 39 checks passed
@Kontinuation Kontinuation deleted the fix-raster-reader-resource-leaks branch August 23, 2023 15:14
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