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

WCS client TIFFReader: add short[] variants of readStrip and readTile #813

Merged
merged 1 commit into from
Feb 22, 2022

Conversation

jampukka
Copy link
Member

Add short[] variants of readStrip and readTile methods to TIFFReader.
Add simple tests for TIFFReader checking we can correctly read tiled TIFFs of type Int16, UInt16, Float32.

Instead of returning void return the dst array to allow for nicer api, allowing for example:
float[] tile = myMap.computeIfAbsent(tileIndex, __ -> tiffreader.read(0, tileIndex, new float[256 * 256]));
instead of
float[] tile = myMap.computeIfAbsent(tileIndex, __ -> { float[] tmp = new float[256 * 256]; tiffreader.read(0, tileIndex, tmp); return tmp; }));

@jampukka jampukka requested a review from ZakarFin February 22, 2022 10:51
@ZakarFin ZakarFin added this to the 2.7.0 milestone Feb 22, 2022
@ZakarFin
Copy link
Member

Nice, thanks!

@ZakarFin ZakarFin merged commit 2008ee7 into oskariorg:develop Feb 22, 2022
@jampukka jampukka deleted the feature/tiffreader-int16 branch March 2, 2022 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants