sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] branch geoapi-4.0 updated: Edit `GridCoverageResource` contract by allowing `getGridGeometry()` and `getSampleDimensions()` to be slightly different than the corresponding `GridCoverage` properties.
Date Thu, 18 Apr 2019 09:37:13 GMT
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 4263e79  Edit `GridCoverageResource` contract by allowing `getGridGeometry()` and
`getSampleDimensions()` to be slightly different than the corresponding `GridCoverage` properties.
4263e79 is described below

commit 4263e79a66e0a61acf8d8332452b40e144449146
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Thu Apr 18 11:36:19 2019 +0200

    Edit `GridCoverageResource` contract by allowing `getGridGeometry()` and `getSampleDimensions()`
to be slightly different than the corresponding `GridCoverage` properties.
---
 .../java/org/apache/sis/storage/GridCoverageResource.java    | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/storage/sis-storage/src/main/java/org/apache/sis/storage/GridCoverageResource.java
b/storage/sis-storage/src/main/java/org/apache/sis/storage/GridCoverageResource.java
index 1c9cb2e..16ffd41 100644
--- a/storage/sis-storage/src/main/java/org/apache/sis/storage/GridCoverageResource.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/storage/GridCoverageResource.java
@@ -59,6 +59,12 @@ public interface GridCoverageResource extends DataSet {
      *   <li>An <em>estimation</em> of grid resolution for each "real world"
axis.</li>
      * </ul>
      *
+     * The grid returned by this method <em>should</em> be equal to the grid
returned by
+     * <code>{@linkplain #read(GridGeometry, int...) read}(null).{@linkplain GridCoverage#getGridGeometry()
getGridGeometry()}</code>.
+     * However the grid geometry returned by this method is allowed to be only approximate
if computing accurate information would be
+     * prohibitively expensive, or if the grid geometry depends on the exact argument value
given to the {@code read(…)} method.
+     * At least, the {@linkplain GridGeometry#getDimension() number of dimensions} should
match.
+     *
      * @return extent of grid coordinates together with their mapping to "real world" coordinates.
      * @throws DataStoreException if an error occurred while reading definitions from the
underlying data store.
      *
@@ -85,6 +91,12 @@ public interface GridCoverageResource extends DataSet {
      * and sample dimension names may be "Red", "Green" and "Blue" for instance. Those sample
dimensions do not need
      * to contain any {@linkplain SampleDimension#getCategories() category}.
      *
+     * <p>The list returned by this method <em>should</em> be equal to
the list returned by
+     * <code>{@linkplain #read(GridGeometry, int...) read}(null).{@linkplain GridCoverage#getSampleDimensions()
getSampleDimensions()}</code>.
+     * However the sample dimensions returned by this method is allowed to be only approximate
if computing accurate information
+     * would be prohibitively expensive, or if the sample dimensions depend on the {@code
domain} argument (area of interest)
+     * given to the {@code read(…)} method. At least, the number of sample dimensions should
match.</p>
+     *
      * @return ranges of sample values together with their mapping to "real values".
      * @throws DataStoreException if an error occurred while reading definitions from the
underlying data store.
      *


Mime
View raw message