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 2024/12/06 16:48:09 UTC

(sis) branch geoapi-4.0 updated: Relax the check for the number of dimensions when the grid coverage has less dimensions than its CRS.

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


The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
     new 334fd6ba50 Relax the check for the number of dimensions when the grid coverage has less dimensions than its CRS.
334fd6ba50 is described below

commit 334fd6ba506348c52ac83502e2a84693345bd94f
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Fri Dec 6 17:47:40 2024 +0100

    Relax the check for the number of dimensions when the grid coverage has less dimensions than its CRS.
---
 .../main/org/apache/sis/storage/base/TiledGridCoverage.java             | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/base/TiledGridCoverage.java b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/base/TiledGridCoverage.java
index 1094a457d5..e9dae5ad18 100644
--- a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/base/TiledGridCoverage.java
+++ b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/base/TiledGridCoverage.java
@@ -454,7 +454,7 @@ public abstract class TiledGridCoverage extends GridCoverage {
             sliceExtent = available;
         } else {
             final int sd = sliceExtent.getDimension();
-            if (sd != dimension) {
+            if (sd < dimension || sd > available.getDimension()) {
                 throw new MismatchedDimensionException(Errors.format(
                         Errors.Keys.MismatchedDimension_3, "sliceExtent", dimension, sd));
             }