You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2026/04/15 15:41:44 UTC
(sis) 01/02: For GeoTIFF reader, `getTileMatrixSets()` returns an empty collection for images encoded with strips instead of tiles.
This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git
commit 4d546436a5cd0fc19348559f8593a8394a5e1b34
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Wed Apr 15 14:49:09 2026 +0200
For GeoTIFF reader, `getTileMatrixSets()` returns an empty collection for images encoded with strips instead of tiles.
---
.../main/org/apache/sis/storage/geotiff/ImageFileDirectory.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/ImageFileDirectory.java b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/ImageFileDirectory.java
index 476836cb3b..2a2668ab0b 100644
--- a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/ImageFileDirectory.java
+++ b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/ImageFileDirectory.java
@@ -113,8 +113,8 @@ final class ImageFileDirectory extends DataCube {
/**
* Index of the (potentially pyramided) image containing this Image File Directory (IFD).
* All reduced-resolution (overviews) images are ignored when computing this index value.
- * If the TIFF file does not contain reduced-resolution (overview) images, then
- * {@code index} value is the same as the index of this IFD in the TIFF file.
+ * If the <abbr>TIFF</abbr> file does not contain reduced-resolution (overview) images,
+ * then {@code index} value is the same as the index of this IFD in the TIFF file.
*
* <p>If this IFD is a reduced-resolution (overview) image, then this index is off by one.
* It has the value of the next pyramid. This is an artifact of the way index is computed
@@ -2017,9 +2017,12 @@ final class ImageFileDirectory extends DataCube {
/**
* Returns information about the overviews which form the pyramid.
+ * If the image does not use the {@code Tile*} family of <abbr>TIFF</abbr> tags,
+ * then this method return an empty list.
*/
@Override
protected List<Pyramid> getPyramids() throws DataStoreException {
+ if (tileTagFamily != TILE) return List.of();
return (overviews != null) ? List.of(overviews) : super.getPyramids();
}