Skip to content

Fix Tiled TIFF BitCellType Segments conversion - #3102

Merged
pomadchin merged 2 commits into
locationtech:masterfrom
pomadchin:feature/tiled-bit-tiff-fix
Oct 3, 2019
Merged

pomadchin merged 2 commits into
locationtech:masterfrom
pomadchin:feature/tiled-bit-tiff-fix

Conversation

@pomadchin

@pomadchin pomadchin commented Oct 1, 2019 •

Copy link
Copy Markdown
Member

Overview

This PR fixes GeoTIffTile CellType conversion, in particular GeoTiffSegment CellType conversions. During the work on this fix, it became obvious that our TIFF API doesn't support a proper work with striped BitTiffs (this fact made this issue debugging a bit more tricky), that is why this PR at least covers Tiled tiffs support.

Checklist

  • docs/CHANGELOG.rst updated, if necessary
  • Unit tests added for bug-fix or new feature

Fixes #3055

Note

This issue indeed closes #3055 in any case, since COGs are Tiled TIFFs. If this PR won't cover Striped TIFFs support, I will create a separate issue to address it. This PR blocks a 3.0 release, a complete striped bit TIFFs support does not.

assertEqual(tiffTile.toArrayTile(), tile.toArrayTile)

// check that it is possible to convert int cellType to bit cellType
// and that bitCellType conversion is idempotent

@pomadchin pomadchin Oct 1, 2019 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This requires idempotence check, since it is the best way to prove that we're setting / unsetting and inverting bits correct to check that even / odd number of conversions would not affect the final result.

@pomadchin
pomadchin force-pushed the feature/tiled-bit-tiff-fix branch 3 times, most recently from f30b97c to 048174c Compare October 1, 2019 23:44
@pomadchin pomadchin changed the title Fix TIFF Segments BitCellType conversion Fix Tiled TIFF BitCellType Segments conversion Oct 3, 2019
Signed-off-by: Grigory Pomadchin <[email protected]>
@pomadchin
pomadchin force-pushed the feature/tiled-bit-tiff-fix branch from c953e82 to a932efc Compare October 3, 2019 00:12
@pomadchin
pomadchin merged commit dbbeedc into locationtech:master Oct 3, 2019
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.

Error When Saving a COGLayer With a BitCellType

1 participant