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 7b9bdae224 In `appendDimension(...)` methods; restrict the CRS type to SingleCRS since it must be one-dimensional. 7b9bdae224 is described below commit 7b9bdae224ebc440c2e0ee8693b5e8fde20c24ba Author: Martin Desruisseaux <martin.desruisse...@geomatys.com> AuthorDate: Sat Nov 25 19:30:33 2023 +0100 In `appendDimension(...)` methods; restrict the CRS type to SingleCRS since it must be one-dimensional. --- .../org/apache/sis/coverage/grid/GridCoverageProcessor.java | 3 ++- .../org/apache/sis/storage/aggregate/CoverageAggregator.java | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridCoverageProcessor.java b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridCoverageProcessor.java index d5ce4ed858..82096211d5 100644 --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridCoverageProcessor.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridCoverageProcessor.java @@ -32,6 +32,7 @@ import javax.measure.Quantity; import org.opengis.util.FactoryException; import org.opengis.metadata.spatial.DimensionNameType; import org.opengis.referencing.datum.PixelInCell; +import org.opengis.referencing.crs.SingleCRS; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.MathTransform1D; @@ -666,7 +667,7 @@ public class GridCoverageProcessor implements Cloneable { * * @since 1.5 */ - public GridCoverage appendDimension(final GridCoverage source, double lower, final double span, final CoordinateReferenceSystem crs) { + public GridCoverage appendDimension(final GridCoverage source, double lower, final double span, final SingleCRS crs) { /* * Choose a cell index such as the translation term in the matrix will be as close as possible to zero. * Reducing the magnitude of additions with IEEE 754 arithmetic can help to reduce rounding errors. diff --git a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/aggregate/CoverageAggregator.java b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/aggregate/CoverageAggregator.java index a3cff71f4d..5e6b9c868a 100644 --- a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/aggregate/CoverageAggregator.java +++ b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/aggregate/CoverageAggregator.java @@ -31,7 +31,7 @@ import java.time.Instant; import java.time.Duration; import org.opengis.util.GenericName; import org.opengis.metadata.spatial.DimensionNameType; -import org.opengis.referencing.crs.CoordinateReferenceSystem; +import org.opengis.referencing.crs.SingleCRS; import org.opengis.referencing.datum.PixelInCell; import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.NoninvertibleTransformException; @@ -244,11 +244,11 @@ public final class CoverageAggregator extends Group<GroupBySample> { * @param crs one-dimensional coordinate reference system of the slice, or {@code null} if unknown. * @throws IllegalGridGeometryException if the compound CRS or compound extent cannot be created. * - * @see GridCoverageProcessor#appendDimension(GridCoverage, double, double, CoordinateReferenceSystem) + * @see GridCoverageProcessor#appendDimension(GridCoverage, double, double, SingleCRS) * * @since 1.5 */ - public void add(GridCoverage coverage, double lower, double span, CoordinateReferenceSystem crs) { + public void add(GridCoverage coverage, double lower, double span, SingleCRS crs) { add(processor().appendDimension(coverage, lower, span, crs)); } @@ -323,8 +323,8 @@ public final class CoverageAggregator extends Group<GroupBySample> { * * @since 1.5 */ - public void add(final GridCoverageResource resource, final double lower, final double span, - final CoordinateReferenceSystem crs) throws DataStoreException + public void add(final GridCoverageResource resource, final double lower, final double span, final SingleCRS crs) + throws DataStoreException { /* * This code currently duplicates `GridCoverageProcessor.appendDimension(..., double, double, CRS)`,