-
Notifications
You must be signed in to change notification settings - Fork 361
Fix Overviews Read Incorrectly when Per Dataset Masks Present bug #3271
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -160,13 +160,21 @@ object GeoTiffInfo { | |
| case Tiff => | ||
| var ifdOffset = byteReader.getInt | ||
| while (ifdOffset > 0) { | ||
| tiffTagsBuffer += TiffTags.read(byteReader, ifdOffset)(IntTiffTagOffsetSize) | ||
| val ifdTiffTags = TiffTags.read(byteReader, ifdOffset)(IntTiffTagOffsetSize) | ||
| // TIFF Reader supports only overviews at this point | ||
| // Overview is a reduced-resolution IFD | ||
| val subfileType = ifdTiffTags.nonBasicTags.newSubfileType.flatMap(NewSubfileType.fromCode) | ||
| if(subfileType.contains(ReducedImage)) tiffTagsBuffer += ifdTiffTags | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The idea is that we're skipping everything that is not a
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 but also noting that this kind of comment is super helpful for a user to see in the method docstring. It would be helpful for the user to know at a glance something like "Only |
||
| ifdOffset = byteReader.getInt | ||
| } | ||
| case _ => | ||
| var ifdOffset = byteReader.getLong | ||
| while (ifdOffset > 0) { | ||
| tiffTagsBuffer += TiffTags.read(byteReader, ifdOffset)(LongTiffTagOffsetSize) | ||
| val ifdTiffTags = TiffTags.read(byteReader, ifdOffset)(LongTiffTagOffsetSize) | ||
| // TIFF Reader supports only overviews at this point | ||
| // Overview is a reduced-resolution IFD | ||
| val subfileType = ifdTiffTags.nonBasicTags.newSubfileType.flatMap(NewSubfileType.fromCode) | ||
| if(subfileType.contains(ReducedImage)) tiffTagsBuffer += ifdTiffTags | ||
| ifdOffset = byteReader.getLong | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,9 +18,7 @@ package geotrellis.raster.io.geotiff.tags | |
|
|
||
| import ProjectionTypesMap._ | ||
| import geotrellis.raster.io.geotiff.reader.MalformedGeoTiffException | ||
| import geotrellis.raster.io.geotiff.util._ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎉 big fan of removal of unused imports whenever possible! |
||
|
|
||
| import monocle.syntax._ | ||
| import monocle.macros.Lenses | ||
| import io.circe._ | ||
| import io.circe.generic.semiauto._ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.