Skip to content

Commit

Permalink
GeoTiffReader Unknown tags skip fix (#3557)
Browse files Browse the repository at this point in the history
* GeoTiffReader Unknown tags skip fix

* CHANGELOG.md update
  • Loading branch information
pomadchin authored Jan 4, 2025
1 parent e67c2e5 commit a9f2d0c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Update GDAL up to 3.9.x [#3540](https://github.com/locationtech/geotrellis/pull/3540)
- Fix reprojection with downsampling for GeotiffRasterSource and tile RDDs. Reprojection outside the valid projection bounds may now throw a GeoAttrsError. [#3541](https://github.com/locationtech/geotrellis/issues/3541)
- ConstantTile with NoData: support idempotent CellType conversions [#3553](https://github.com/locationtech/geotrellis/pull/3553)
- GeoTiffReader Unknown tags skip fix [#3557](https://github.com/locationtech/geotrellis/pull/3557)

## [3.7.1] - 2024-01-08

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ object TiffTags {
readLongsTag(byteReader, tiffTags, tagMetadata)
case (_, IFDOffset) =>
readLongsTag(byteReader, tiffTags, tagMetadata)
case _ => TiffTags() // skip unsupported tags
case _ => tiffTags // skip unsupported tags
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,12 @@ class GeoTiffReaderSpec extends AnyFunSpec with Matchers with BeforeAndAfterAll

geoTiff.options.subfileType should be (None)
}

// https://github.com/locationtech/geotrellis/issues/3556
it("should skip unknown tags") {
val geotiff = GeoTiff.readMultiband(geoTiffPath("unsupported-tiff-tags.tif"))
geotiff.tags.headTags.size should be (2)
}
}

describe("Reading and writing special metadata tags ") {
Expand Down

0 comments on commit a9f2d0c

Please sign in to comment.