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 2023/11/28 17:14:31 UTC

(sis) 01/02: Revert the deletion of `AbstractGridCoverageResource.getEnvelope()`, but with redirection to the default method defined in the interface.

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 ad045a37bf209ae04d7ece029e7dee1ec41c4e22
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Tue Nov 28 16:16:02 2023 +0100

    Revert the deletion of `AbstractGridCoverageResource.getEnvelope()`,
    but with redirection to the default method defined in the interface.
---
 .../apache/sis/storage/AbstractGridCoverageResource.java  | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/AbstractGridCoverageResource.java b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/AbstractGridCoverageResource.java
index 862133bc4f..dcb29b2e3f 100644
--- a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/AbstractGridCoverageResource.java
+++ b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/AbstractGridCoverageResource.java
@@ -17,6 +17,7 @@
 package org.apache.sis.storage;
 
 import java.util.Locale;
+import java.util.Optional;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import java.util.logging.LogRecord;
@@ -96,6 +97,20 @@ public abstract class AbstractGridCoverageResource extends AbstractResource impl
         super(parentListeners, hidden);
     }
 
+    /**
+     * Returns the envelope of the grid geometry if known.
+     * The envelope is absent if the grid geometry does not provide this information.
+     *
+     * @return the grid geometry envelope.
+     * @throws DataStoreException if an error occurred while computing the grid geometry.
+     *
+     * @see GridGeometry#getEnvelope()
+     */
+    @Override
+    public Optional<Envelope> getEnvelope() throws DataStoreException {
+        return GridCoverageResource.super.getEnvelope();
+    }
+
     /**
      * Invoked in a synchronized block the first time that {@code getMetadata()} is invoked.
      * The default implementation populates metadata based on information provided by