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 9e0e1fb26b2e822ef1f1be05e7c142fa69dd9a90 Author: Martin Desruisseaux <[email protected]> AuthorDate: Thu May 16 16:29:18 2024 +0200 Update for change in GeoAPI 4 development branch: - MismatchedReferenceSystemException renamed MismatchedCoordinateMetadataException for consistency with ISO 19111:2019 `CoordinateMetadata` (a CRS + an epoch). - Exceptions moved to the `org.opengis.coordinate` package. - New `MathTransform.createMatrix(int numRows, int numCols)` method. --- .../main/org/apache/sis/console/TransformCommand.java | 2 +- .../sis/coverage/MismatchedCoverageRangeException.java | 2 +- .../apache/sis/coverage/grid/BufferedGridCoverage.java | 2 +- .../sis/coverage/grid/DimensionalityReduction.java | 2 +- .../sis/coverage/grid/FractionalGridCoordinates.java | 2 +- .../main/org/apache/sis/coverage/grid/GridCoverage.java | 2 +- .../org/apache/sis/coverage/grid/GridCoverage2D.java | 2 +- .../main/org/apache/sis/coverage/grid/GridExtent.java | 2 +- .../main/org/apache/sis/coverage/grid/GridGeometry.java | 2 +- .../main/org/apache/sis/coverage/grid/ImageRenderer.java | 2 +- .../apache/sis/coverage/privy/CommonDomainFinder.java | 2 +- .../apache/sis/filter/internal/GeometryConverter.java | 2 +- .../main/org/apache/sis/geometry/wrapper/Geometries.java | 2 +- .../org/apache/sis/coverage/grid/GridCoverage2DTest.java | 2 +- .../org/apache/sis/geometry/wrapper/jts/JTSTest.java | 2 +- .../sis/metadata/iso/extent/DefaultVerticalExtent.java | 8 ++++---- .../main/org/apache/sis/metadata/iso/extent/Extents.java | 4 ++-- .../main/org/apache/sis/portrayal/Canvas.java | 6 +++--- .../org/apache/sis/geometry/AbstractDirectPosition.java | 12 ++++++------ .../main/org/apache/sis/geometry/AbstractEnvelope.java | 10 +++++----- .../main/org/apache/sis/geometry/ArrayEnvelope.java | 8 ++++---- .../main/org/apache/sis/geometry/DirectPosition1D.java | 2 +- .../main/org/apache/sis/geometry/DirectPosition2D.java | 2 +- .../main/org/apache/sis/geometry/Envelope2D.java | 8 ++++---- .../main/org/apache/sis/geometry/Envelopes.java | 2 +- .../org/apache/sis/geometry/GeneralDirectPosition.java | 2 +- .../main/org/apache/sis/geometry/GeneralEnvelope.java | 8 ++++---- .../main/org/apache/sis/geometry/ImmutableEnvelope.java | 8 ++++---- .../main/org/apache/sis/referencing/crs/AbstractCRS.java | 2 +- .../apache/sis/referencing/crs/AbstractDerivedCRS.java | 2 +- .../apache/sis/referencing/crs/DefaultDerivedCRS.java | 2 +- .../apache/sis/referencing/crs/DefaultProjectedCRS.java | 2 +- .../main/org/apache/sis/referencing/cs/AbstractCS.java | 2 +- .../sis/referencing/internal/PositionTransformer.java | 2 +- .../org/apache/sis/referencing/internal/RTreeNode.java | 4 ++-- .../referencing/operation/MismatchedDatumException.java | 4 ++-- .../referencing/operation/TransformedCoordinateSet.java | 2 +- .../operation/builder/LinearTransformBuilder.java | 2 +- .../operation/builder/LocalizationGridBuilder.java | 2 +- .../operation/builder/ProjectedTransformTry.java | 2 +- .../sis/referencing/operation/matrix/Matrices.java | 4 ++-- .../operation/matrix/MismatchedMatrixSizeException.java | 4 ++-- .../operation/transform/AbstractMathTransform.java | 2 +- .../operation/transform/AbstractMathTransform1D.java | 2 +- .../operation/transform/ConcatenatedTransform.java | 2 +- .../operation/transform/DefaultMathTransformFactory.java | 16 ++++++++++++++++ .../transform/InterpolatedGeocentricTransform.java | 2 +- .../referencing/operation/transform/MathTransforms.java | 2 +- .../operation/transform/PassThroughTransform.java | 2 +- .../operation/transform/MathTransformFactoryBase.java | 6 ++++++ .../operation/transform/MathTransformFactoryMock.java | 13 +++++++++++++ .../operation/transform/MathTransformWrapper.java | 2 +- .../operation/transform/TransformResultComparator.java | 2 +- .../org/apache/sis/storage/base/TiledGridCoverage.java | 2 +- .../main/org/apache/sis/math/Line.java | 2 +- .../main/org/apache/sis/math/Plane.java | 2 +- .../main/org/apache/sis/util/ArgumentChecks.java | 2 +- geoapi/snapshot | 2 +- .../sis/map/service/se1/PresentationToScene2D.java | 2 +- .../main/org/apache/sis/gui/map/MapCanvas.java | 2 +- .../main/org/apache/sis/gui/map/StatusBar.java | 2 +- 61 files changed, 124 insertions(+), 89 deletions(-) diff --git a/endorsed/src/org.apache.sis.console/main/org/apache/sis/console/TransformCommand.java b/endorsed/src/org.apache.sis.console/main/org/apache/sis/console/TransformCommand.java index 19bcfbcb91..7e5a11f472 100644 --- a/endorsed/src/org.apache.sis.console/main/org/apache/sis/console/TransformCommand.java +++ b/endorsed/src/org.apache.sis.console/main/org/apache/sis/console/TransformCommand.java @@ -33,7 +33,7 @@ import javax.measure.IncommensurableException; import org.opengis.metadata.Metadata; import org.opengis.metadata.extent.Extent; import org.opengis.metadata.extent.GeographicBoundingBox; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.util.FactoryException; import org.opengis.util.InternationalString; import org.opengis.referencing.IdentifiedObject; diff --git a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/MismatchedCoverageRangeException.java b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/MismatchedCoverageRangeException.java index 92d18e3b99..a9cc4d189c 100644 --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/MismatchedCoverageRangeException.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/MismatchedCoverageRangeException.java @@ -24,7 +24,7 @@ package org.apache.sis.coverage; * @author Martin Desruisseaux (Geomatys) * @version 1.0 * - * @see org.opengis.geometry.MismatchedDimensionException + * @see org.opengis.coordinate.MismatchedDimensionException * * @since 1.0 */ diff --git a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/BufferedGridCoverage.java b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/BufferedGridCoverage.java index 20a14d9bd7..c7c9ef65e8 100644 --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/BufferedGridCoverage.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/BufferedGridCoverage.java @@ -30,7 +30,7 @@ import java.awt.image.RasterFormatException; import java.awt.image.RenderedImage; import org.opengis.util.FactoryException; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.operation.TransformException; import org.apache.sis.coverage.SampleDimension; import org.apache.sis.feature.internal.Resources; diff --git a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/DimensionalityReduction.java b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/DimensionalityReduction.java index 14e75b7b55..5269cbad72 100644 --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/DimensionalityReduction.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/DimensionalityReduction.java @@ -25,7 +25,7 @@ import java.util.function.UnaryOperator; import java.io.Serializable; import org.opengis.util.FactoryException; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.operation.MathTransformFactory; import org.opengis.referencing.operation.MathTransform; diff --git a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/FractionalGridCoordinates.java b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/FractionalGridCoordinates.java index a7e59a1e39..c1a3fd6284 100644 --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/FractionalGridCoordinates.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/FractionalGridCoordinates.java @@ -19,7 +19,7 @@ package org.apache.sis.coverage.grid; import java.util.Arrays; import java.io.Serializable; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.TransformException; import org.opengis.referencing.datum.PixelInCell; diff --git a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridCoverage.java b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridCoverage.java index 67a0be0812..e38df65d24 100644 --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridCoverage.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridCoverage.java @@ -24,7 +24,7 @@ import java.util.Optional; import java.awt.image.RenderedImage; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.operation.MathTransform1D; import org.opengis.referencing.operation.TransformException; diff --git a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridCoverage2D.java b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridCoverage2D.java index c284a4d2d2..91343a9c73 100644 --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridCoverage2D.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridCoverage2D.java @@ -38,7 +38,7 @@ import org.opengis.util.NameFactory; import org.opengis.util.InternationalString; import org.opengis.util.FactoryException; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.datum.PixelInCell; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.operation.NoninvertibleTransformException; diff --git a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridExtent.java b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridExtent.java index d7efe9281e..d7d5758175 100644 --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridExtent.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridExtent.java @@ -31,7 +31,7 @@ import org.opengis.util.FactoryException; import org.opengis.util.InternationalString; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.metadata.spatial.DimensionNameType; import org.opengis.referencing.cs.AxisDirection; import org.opengis.referencing.cs.CoordinateSystem; diff --git a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridGeometry.java b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridGeometry.java index 391cf49463..18db5b1952 100644 --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridGeometry.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridGeometry.java @@ -30,7 +30,7 @@ import org.opengis.util.FactoryException; import org.opengis.metadata.Identifier; import org.opengis.metadata.extent.GeographicBoundingBox; import org.opengis.geometry.Envelope; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.datum.PixelInCell; import org.opengis.referencing.operation.Matrix; import org.opengis.referencing.operation.MathTransform; diff --git a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/ImageRenderer.java b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/ImageRenderer.java index 706c6487c2..cec0bc7452 100644 --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/ImageRenderer.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/ImageRenderer.java @@ -39,7 +39,7 @@ import static java.lang.Math.multiplyExact; import static java.lang.Math.incrementExact; import static java.lang.Math.toIntExact; import org.opengis.util.FactoryException; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.operation.MathTransformFactory; import org.apache.sis.image.DataType; import org.apache.sis.coverage.SubspaceNotSpecifiedException; diff --git a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/privy/CommonDomainFinder.java b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/privy/CommonDomainFinder.java index 6d2d581f8c..7d8bf99ed9 100644 --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/privy/CommonDomainFinder.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/privy/CommonDomainFinder.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.LinkedHashMap; import java.util.NoSuchElementException; import org.opengis.util.FactoryException; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.datum.PixelInCell; import org.opengis.referencing.operation.Matrix; import org.opengis.referencing.operation.MathTransform; diff --git a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/filter/internal/GeometryConverter.java b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/filter/internal/GeometryConverter.java index 129d1f4c73..e744160106 100644 --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/filter/internal/GeometryConverter.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/filter/internal/GeometryConverter.java @@ -22,7 +22,7 @@ import java.util.Objects; import org.opengis.util.ScopedName; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.metadata.extent.GeographicBoundingBox; import org.apache.sis.util.Classes; import org.apache.sis.util.resources.Errors; diff --git a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/Geometries.java b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/Geometries.java index 6a411d8fe5..d8a53ac213 100644 --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/Geometries.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/Geometries.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.logging.Logger; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.cs.CoordinateSystem; import org.opengis.referencing.cs.CoordinateSystemAxis; import org.opengis.referencing.crs.CoordinateReferenceSystem; diff --git a/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/GridCoverage2DTest.java b/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/GridCoverage2DTest.java index 0ebb6f5557..01155a7cd3 100644 --- a/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/GridCoverage2DTest.java +++ b/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/GridCoverage2DTest.java @@ -25,7 +25,7 @@ import java.awt.image.RenderedImage; import java.awt.image.WritableRaster; import java.awt.image.WritableRenderedImage; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.operation.MathTransform1D; import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.datum.PixelInCell; diff --git a/endorsed/src/org.apache.sis.feature/test/org/apache/sis/geometry/wrapper/jts/JTSTest.java b/endorsed/src/org.apache.sis.feature/test/org/apache/sis/geometry/wrapper/jts/JTSTest.java index f234afebaf..2eae57bd48 100644 --- a/endorsed/src/org.apache.sis.feature/test/org/apache/sis/geometry/wrapper/jts/JTSTest.java +++ b/endorsed/src/org.apache.sis.feature/test/org/apache/sis/geometry/wrapper/jts/JTSTest.java @@ -22,7 +22,7 @@ import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.CoordinateXY; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.GeometryFactory; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.util.FactoryException; import org.opengis.referencing.operation.TransformException; import org.opengis.referencing.crs.CoordinateReferenceSystem; diff --git a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/extent/DefaultVerticalExtent.java b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/extent/DefaultVerticalExtent.java index a59c358196..d16a4b27a3 100644 --- a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/extent/DefaultVerticalExtent.java +++ b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/extent/DefaultVerticalExtent.java @@ -35,7 +35,7 @@ import org.apache.sis.util.Utilities; import org.apache.sis.util.resources.Errors; // Specific to the geoapi-3.1 and geoapi-4.0 branches: -import org.opengis.geometry.MismatchedReferenceSystemException; +import org.opengis.coordinate.MismatchedCoordinateMetadataException; /** @@ -275,14 +275,14 @@ public class DefaultVerticalExtent extends ISOMetadata implements VerticalExtent * bounds, then the corresponding bounds of the intersection result will also be NaN.</p> * * @param other the vertical extent to intersect with this extent. - * @throws MismatchedReferenceSystemException if the two extents do not use the same datum, ignoring metadata. + * @throws MismatchedCoordinateMetadataException if the two extents do not use the same datum, ignoring metadata. * * @see Extents#intersection(VerticalExtent, VerticalExtent) * @see org.apache.sis.geometry.GeneralEnvelope#intersect(Envelope) * * @since 0.8 */ - public void intersect(final VerticalExtent other) throws MismatchedReferenceSystemException { + public void intersect(final VerticalExtent other) throws MismatchedCoordinateMetadataException { checkWritePermission(value()); Double min = other.getMinimumValue(); Double max = other.getMaximumValue(); @@ -309,7 +309,7 @@ public class DefaultVerticalExtent extends ISOMetadata implements VerticalExtent } } } catch (UnsupportedOperationException | FactoryException | ClassCastException | TransformException e) { - throw new MismatchedReferenceSystemException(Errors.format(Errors.Keys.IncompatiblePropertyValue_1, "verticalCRS"), e); + throw new MismatchedCoordinateMetadataException(Errors.format(Errors.Keys.IncompatiblePropertyValue_1, "verticalCRS"), e); } if (minimumValue != null && maximumValue != null && minimumValue > maximumValue) { minimumValue = maximumValue = NilReason.MISSING.createNilObject(Double.class); diff --git a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/extent/Extents.java b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/extent/Extents.java index 2459f6ce53..265947e938 100644 --- a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/extent/Extents.java +++ b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/extent/Extents.java @@ -70,7 +70,7 @@ import static org.apache.sis.util.privy.CollectionsExt.nonNull; import static org.apache.sis.metadata.privy.ReferencingServices.AUTHALIC_RADIUS; // Specific to the geoapi-3.1 and geoapi-4.0 branches: -import org.opengis.geometry.MismatchedReferenceSystemException; +import org.opengis.coordinate.MismatchedCoordinateMetadataException; import org.opengis.referencing.datum.RealizationMethod; @@ -714,7 +714,7 @@ public final class Extents extends Static { * @param e2 the second extent, or {@code null}. * @return the intersection (may be any of the {@code e1} or {@code e2} argument if unchanged), * or {@code null} if the two given extents are null. - * @throws MismatchedReferenceSystemException if the two extents do not use the same datum, ignoring metadata. + * @throws MismatchedCoordinateMetadataException if the two extents do not use the same datum, ignoring metadata. * * @see DefaultVerticalExtent#intersect(VerticalExtent) * diff --git a/endorsed/src/org.apache.sis.portrayal/main/org/apache/sis/portrayal/Canvas.java b/endorsed/src/org.apache.sis.portrayal/main/org/apache/sis/portrayal/Canvas.java index 35171bfb6c..8d69567214 100644 --- a/endorsed/src/org.apache.sis.portrayal/main/org/apache/sis/portrayal/Canvas.java +++ b/endorsed/src/org.apache.sis.portrayal/main/org/apache/sis/portrayal/Canvas.java @@ -23,7 +23,7 @@ import java.util.Optional; import java.util.OptionalDouble; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.metadata.extent.GeographicBoundingBox; import org.opengis.metadata.spatial.DimensionNameType; import org.opengis.referencing.crs.CoordinateReferenceSystem; @@ -58,7 +58,7 @@ import org.apache.sis.coverage.grid.GridGeometry; import org.apache.sis.coverage.grid.GridExtent; // Specific to the geoapi-3.1 and geoapi-4.0 branches: -import org.opengis.geometry.MismatchedReferenceSystemException; +import org.opengis.coordinate.MismatchedCoordinateMetadataException; import org.opengis.coverage.CannotEvaluateException; @@ -796,7 +796,7 @@ public class Canvas extends Observable implements Localized { ArgumentChecks.ensureNonNull(DISPLAY_BOUNDS_PROPERTY, newValue); final CoordinateReferenceSystem crs = newValue.getCoordinateReferenceSystem(); if (crs != null && !Utilities.equalsIgnoreMetadata(getDisplayCRS(), crs)) { - throw new MismatchedReferenceSystemException(errors().getString( + throw new MismatchedCoordinateMetadataException(errors().getString( Errors.Keys.IllegalCoordinateSystem_1, IdentifiedObjects.getDisplayName(crs, getLocale()))); } final GeneralEnvelope oldValue = new GeneralEnvelope(displayBounds); diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/AbstractDirectPosition.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/AbstractDirectPosition.java index b676c51bbb..c802d204d7 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/AbstractDirectPosition.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/AbstractDirectPosition.java @@ -25,8 +25,8 @@ package org.apache.sis.geometry; import java.util.Arrays; import java.util.Objects; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; -import org.opengis.geometry.MismatchedReferenceSystemException; +import org.opengis.coordinate.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedCoordinateMetadataException; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.cs.CoordinateSystemAxis; import org.opengis.referencing.cs.CoordinateSystem; @@ -121,15 +121,15 @@ public abstract class AbstractDirectPosition extends FormattableObject implement * * <p>If this position and the given position have a non-null CRS, then the default implementation * requires the CRS to be {@linkplain Utilities#equalsIgnoreMetadata equals (ignoring metadata)}, - * otherwise a {@code MismatchedReferenceSystemException} is thrown. However, subclass may choose + * otherwise a {@code MismatchedCoordinateMetadataException} is thrown. However, subclass may choose * to assign the CRS of this position to the CRS of the given position.</p> * * @param position the new position, or {@code null}. * @throws MismatchedDimensionException if the given position doesn't have the expected dimension. - * @throws MismatchedReferenceSystemException if the given position doesn't use the expected CRS. + * @throws MismatchedCoordinateMetadataException if the given position doesn't use the expected CRS. */ public void setLocation(final DirectPosition position) - throws MismatchedDimensionException, MismatchedReferenceSystemException + throws MismatchedDimensionException, MismatchedCoordinateMetadataException { final int dimension = getDimension(); if (position != null) { @@ -138,7 +138,7 @@ public abstract class AbstractDirectPosition extends FormattableObject implement if (crs != null) { final CoordinateReferenceSystem other = position.getCoordinateReferenceSystem(); if (other != null && !Utilities.equalsIgnoreMetadata(crs, other)) { - throw new MismatchedReferenceSystemException(Errors.format(Errors.Keys.MismatchedCRS)); + throw new MismatchedCoordinateMetadataException(Errors.format(Errors.Keys.MismatchedCRS)); } } for (int i=0; i<dimension; i++) { diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/AbstractEnvelope.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/AbstractEnvelope.java index d132294d7e..4bd1071ed9 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/AbstractEnvelope.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/AbstractEnvelope.java @@ -31,8 +31,8 @@ import javax.measure.IncommensurableException; import jakarta.xml.bind.annotation.XmlTransient; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; -import org.opengis.geometry.MismatchedReferenceSystemException; +import org.opengis.coordinate.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedCoordinateMetadataException; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.cs.CoordinateSystemAxis; import org.opengis.referencing.cs.CoordinateSystem; @@ -185,11 +185,11 @@ public abstract class AbstractEnvelope extends FormattableObject implements Enve * @param lowerCorner the first position. * @param upperCorner the second position. * @return their common CRS, or {@code null} if none. - * @throws MismatchedReferenceSystemException if the two positions don't use equal CRS. + * @throws MismatchedCoordinateMetadataException if the two positions don't use equal CRS. */ static CoordinateReferenceSystem getCommonCRS(final DirectPosition lowerCorner, final DirectPosition upperCorner) - throws MismatchedReferenceSystemException + throws MismatchedCoordinateMetadataException { final CoordinateReferenceSystem crs1 = lowerCorner.getCoordinateReferenceSystem(); final CoordinateReferenceSystem crs2 = upperCorner.getCoordinateReferenceSystem(); @@ -197,7 +197,7 @@ public abstract class AbstractEnvelope extends FormattableObject implements Enve return crs2; } else { if (crs2 != null && !crs1.equals(crs2)) { - throw new MismatchedReferenceSystemException(Errors.format(Errors.Keys.MismatchedCRS)); + throw new MismatchedCoordinateMetadataException(Errors.format(Errors.Keys.MismatchedCRS)); } return crs1; } diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/ArrayEnvelope.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/ArrayEnvelope.java index ee7457c1c2..22b675f9c8 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/ArrayEnvelope.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/ArrayEnvelope.java @@ -27,8 +27,8 @@ import java.util.Objects; import java.io.Serializable; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; -import org.opengis.geometry.MismatchedReferenceSystemException; +import org.opengis.coordinate.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedCoordinateMetadataException; import org.opengis.metadata.extent.GeographicBoundingBox; import org.opengis.referencing.cs.RangeMeaning; import org.opengis.referencing.cs.CoordinateSystemAxis; @@ -101,10 +101,10 @@ class ArrayEnvelope extends AbstractEnvelope implements Serializable { * @param lowerCorner the limits in the direction of decreasing coordinate values for each dimension. * @param upperCorner the limits in the direction of increasing coordinate values for each dimension. * @throws MismatchedDimensionException if the two positions do not have the same dimension. - * @throws MismatchedReferenceSystemException if the CRS of the two position are not equal. + * @throws MismatchedCoordinateMetadataException if the CRS of the two position are not equal. */ public ArrayEnvelope(final DirectPosition lowerCorner, final DirectPosition upperCorner) - throws MismatchedDimensionException, MismatchedReferenceSystemException + throws MismatchedDimensionException, MismatchedCoordinateMetadataException { crs = getCommonCRS(lowerCorner, upperCorner); // This performs also an argument check. final int dimension = lowerCorner.getDimension(); diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/DirectPosition1D.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/DirectPosition1D.java index fe779520ce..29809ad34a 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/DirectPosition1D.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/DirectPosition1D.java @@ -26,7 +26,7 @@ import java.util.Objects; import java.io.Serializable; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.apache.sis.util.resources.Errors; import static org.apache.sis.util.ArgumentChecks.ensureDimensionMatches; diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/DirectPosition2D.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/DirectPosition2D.java index bd1814dda1..ca17411071 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/DirectPosition2D.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/DirectPosition2D.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.awt.geom.Point2D; import static java.lang.Double.doubleToLongBits; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.cs.AxisDirection; import org.apache.sis.util.ArraysExt; diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/Envelope2D.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/Envelope2D.java index e2af501e78..eb96cfe4b2 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/Envelope2D.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/Envelope2D.java @@ -23,7 +23,7 @@ import static java.lang.Double.isNaN; import static java.lang.Double.doubleToLongBits; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.metadata.extent.GeographicBoundingBox; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.cs.CoordinateSystemAxis; @@ -42,7 +42,7 @@ import static org.apache.sis.geometry.AbstractEnvelope.isWrapAround; import static org.apache.sis.geometry.AbstractEnvelope.isNegativeUnsafe; // Specific to the geoapi-3.1 and geoapi-4.0 branches: -import org.opengis.geometry.MismatchedReferenceSystemException; +import org.opengis.coordinate.MismatchedCoordinateMetadataException; /** @@ -171,11 +171,11 @@ public class Envelope2D extends Rectangle2D.Double implements Envelope, Emptiabl * * @param lowerCorner the first position. * @param upperCorner the second position. - * @throws MismatchedReferenceSystemException if the two positions don't use the same CRS. + * @throws MismatchedCoordinateMetadataException if the two positions don't use the same CRS. * @throws MismatchedDimensionException if the two positions are not two-dimensional. */ public Envelope2D(final DirectPosition lowerCorner, final DirectPosition upperCorner) - throws MismatchedReferenceSystemException, MismatchedDimensionException + throws MismatchedCoordinateMetadataException, MismatchedDimensionException { this(AbstractEnvelope.getCommonCRS(lowerCorner, upperCorner), lowerCorner, upperCorner); } diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/Envelopes.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/Envelopes.java index 9d4d853e67..8ab34a9fa6 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/Envelopes.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/Envelopes.java @@ -31,7 +31,7 @@ import java.util.logging.Logger; import java.time.Instant; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.cs.CoordinateSystem; import org.opengis.referencing.cs.CoordinateSystemAxis; import org.opengis.referencing.crs.CoordinateReferenceSystem; diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/GeneralDirectPosition.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/GeneralDirectPosition.java index 63395b548a..bbeb48584e 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/GeneralDirectPosition.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/GeneralDirectPosition.java @@ -27,7 +27,7 @@ import java.util.Objects; import java.io.Serializable; import java.lang.reflect.Field; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.apache.sis.util.resources.Errors; import org.apache.sis.util.ArraysExt; diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/GeneralEnvelope.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/GeneralEnvelope.java index 137f1b6a64..72c8a46084 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/GeneralEnvelope.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/GeneralEnvelope.java @@ -34,8 +34,8 @@ import org.opengis.referencing.cs.CoordinateSystemAxis; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; -import org.opengis.geometry.MismatchedReferenceSystemException; +import org.opengis.coordinate.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedCoordinateMetadataException; import org.opengis.metadata.extent.GeographicBoundingBox; import org.apache.sis.referencing.privy.TemporalAccessor; import org.apache.sis.referencing.privy.AxisDirections; @@ -159,10 +159,10 @@ public class GeneralEnvelope extends ArrayEnvelope implements Cloneable, Seriali * @param lowerCorner the limits in the direction of decreasing coordinate values for each dimension. * @param upperCorner the limits in the direction of increasing coordinate values for each dimension. * @throws MismatchedDimensionException if the two positions do not have the same dimension. - * @throws MismatchedReferenceSystemException if the CRS of the two position are not equal. + * @throws MismatchedCoordinateMetadataException if the CRS of the two position are not equal. */ public GeneralEnvelope(final DirectPosition lowerCorner, final DirectPosition upperCorner) - throws MismatchedDimensionException, MismatchedReferenceSystemException + throws MismatchedDimensionException, MismatchedCoordinateMetadataException { super(lowerCorner, upperCorner); } diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/ImmutableEnvelope.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/ImmutableEnvelope.java index 89913be87d..a47b29e745 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/ImmutableEnvelope.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/geometry/ImmutableEnvelope.java @@ -25,8 +25,8 @@ package org.apache.sis.geometry; import java.io.Serializable; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; -import org.opengis.geometry.MismatchedReferenceSystemException; +import org.opengis.coordinate.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedCoordinateMetadataException; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.metadata.extent.GeographicBoundingBox; @@ -60,10 +60,10 @@ public final class ImmutableEnvelope extends ArrayEnvelope implements Serializab * @param lowerCorner the limits in the direction of decreasing coordinate values for each dimension. * @param upperCorner the limits in the direction of increasing coordinate values for each dimension. * @throws MismatchedDimensionException if the two positions do not have the same dimension. - * @throws MismatchedReferenceSystemException if the CRS of the two position are not equal. + * @throws MismatchedCoordinateMetadataException if the CRS of the two position are not equal. */ public ImmutableEnvelope(final DirectPosition lowerCorner, final DirectPosition upperCorner) - throws MismatchedDimensionException, MismatchedReferenceSystemException + throws MismatchedDimensionException, MismatchedCoordinateMetadataException { super(lowerCorner, upperCorner); } diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/AbstractCRS.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/AbstractCRS.java index d4de47f133..33b40c1404 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/AbstractCRS.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/AbstractCRS.java @@ -24,7 +24,7 @@ import jakarta.xml.bind.annotation.XmlType; import jakarta.xml.bind.annotation.XmlRootElement; import jakarta.xml.bind.annotation.XmlSeeAlso; import javax.measure.Unit; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.datum.Datum; import org.opengis.referencing.cs.AffineCS; import org.opengis.referencing.cs.CartesianCS; diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/AbstractDerivedCRS.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/AbstractDerivedCRS.java index 84baecb771..e1fe6638b9 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/AbstractDerivedCRS.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/AbstractDerivedCRS.java @@ -31,7 +31,7 @@ import org.opengis.referencing.operation.OperationMethod; import org.opengis.referencing.operation.Conversion; import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.MathTransformFactory; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.apache.sis.referencing.GeodeticException; import org.apache.sis.referencing.cs.AbstractCS; import org.apache.sis.referencing.operation.DefaultConversion; diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultDerivedCRS.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultDerivedCRS.java index 832a631500..d1c3360f7b 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultDerivedCRS.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultDerivedCRS.java @@ -42,7 +42,7 @@ import org.opengis.referencing.operation.Conversion; import org.opengis.referencing.operation.OperationMethod; import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.NoninvertibleTransformException; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.apache.sis.referencing.AbstractIdentifiedObject; import org.apache.sis.referencing.operation.DefaultConversion; import org.apache.sis.referencing.cs.AbstractCS; diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultProjectedCRS.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultProjectedCRS.java index bca03ade69..df85681ccb 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultProjectedCRS.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultProjectedCRS.java @@ -28,7 +28,7 @@ import org.opengis.referencing.cs.CartesianCS; import org.opengis.referencing.cs.CoordinateSystem; // For javadoc import org.opengis.referencing.datum.GeodeticDatum; import org.opengis.referencing.operation.Conversion; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.apache.sis.referencing.cs.AxesConvention; import org.apache.sis.referencing.cs.AbstractCS; import org.apache.sis.referencing.privy.ReferencingUtilities; diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/AbstractCS.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/AbstractCS.java index f69e8f1555..d6b04d37c9 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/AbstractCS.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/AbstractCS.java @@ -35,7 +35,7 @@ import org.opengis.referencing.cs.AxisDirection; import org.opengis.referencing.cs.CoordinateSystem; import org.opengis.referencing.cs.CoordinateSystemAxis; import org.opengis.referencing.cs.CSAuthorityFactory; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.apache.sis.metadata.iso.citation.Citations; import org.apache.sis.referencing.AbstractIdentifiedObject; import org.apache.sis.referencing.IdentifiedObjects; diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/PositionTransformer.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/PositionTransformer.java index 8b66a6eea0..593e182e12 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/PositionTransformer.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/PositionTransformer.java @@ -19,7 +19,7 @@ package org.apache.sis.referencing.internal; import java.util.Objects; import org.opengis.util.FactoryException; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.operation.CoordinateOperation; import org.opengis.referencing.operation.CoordinateOperationFactory; diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/RTreeNode.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/RTreeNode.java index 1a6d00e811..6233155598 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/RTreeNode.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/RTreeNode.java @@ -31,7 +31,7 @@ import org.apache.sis.util.collection.TableColumn; import org.apache.sis.util.collection.DefaultTreeTable; // Specific to the geoapi-3.1 and geoapi-4.0 branches: -import org.opengis.geometry.MismatchedReferenceSystemException; +import org.opengis.coordinate.MismatchedCoordinateMetadataException; /** @@ -251,7 +251,7 @@ detach: for (RTreeNode next; node != null; node = next) { if (common == null) { common = crs; } else if (crs != null && !Utilities.equalsIgnoreMetadata(common, crs)) { - throw new MismatchedReferenceSystemException(Errors.format(Errors.Keys.MismatchedCRS)); + throw new MismatchedCoordinateMetadataException(Errors.format(Errors.Keys.MismatchedCRS)); } } } diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/MismatchedDatumException.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/MismatchedDatumException.java index 4a272d8add..6e8666c6e6 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/MismatchedDatumException.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/MismatchedDatumException.java @@ -36,8 +36,8 @@ package org.apache.sis.referencing.operation; * @author Martin Desruisseaux (Geomatys) * @version 0.6 * - * @see org.opengis.geometry.MismatchedReferenceSystemException - * @see org.opengis.geometry.MismatchedDimensionException + * @see org.opengis.coordinate.MismatchedCoordinateMetadataException + * @see org.opengis.coordinate.MismatchedDimensionException * @see org.apache.sis.referencing.operation.matrix.MismatchedMatrixSizeException * * @since 0.6 diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/TransformedCoordinateSet.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/TransformedCoordinateSet.java index c841441ce6..500b169ff6 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/TransformedCoordinateSet.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/TransformedCoordinateSet.java @@ -23,7 +23,7 @@ import java.util.function.Consumer; import java.util.function.UnaryOperator; import org.opengis.util.FactoryException; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.metadata.extent.GeographicBoundingBox; import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.TransformException; diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/builder/LinearTransformBuilder.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/builder/LinearTransformBuilder.java index ba106b44f8..3445077bd2 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/builder/LinearTransformBuilder.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/builder/LinearTransformBuilder.java @@ -32,7 +32,7 @@ import java.io.UncheckedIOException; import org.opengis.util.FactoryException; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.geometry.coordinate.Position; import org.opengis.referencing.operation.Matrix; import org.opengis.referencing.operation.MathTransform; diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/builder/LocalizationGridBuilder.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/builder/LocalizationGridBuilder.java index 33bed8a709..b28c76edf5 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/builder/LocalizationGridBuilder.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/builder/LocalizationGridBuilder.java @@ -24,7 +24,7 @@ import java.io.IOException; import java.io.UncheckedIOException; import org.opengis.util.FactoryException; import org.opengis.geometry.Envelope; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.operation.Matrix; import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.MathTransformFactory; diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/builder/ProjectedTransformTry.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/builder/ProjectedTransformTry.java index 1823ffa35e..fd16fd3a7b 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/builder/ProjectedTransformTry.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/builder/ProjectedTransformTry.java @@ -23,7 +23,7 @@ import java.util.Locale; import java.util.Collections; import java.util.Objects; import java.text.NumberFormat; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.TransformException; import org.apache.sis.io.TableAppender; diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/matrix/Matrices.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/matrix/Matrices.java index ef9bf28036..e5b333a439 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/matrix/Matrices.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/matrix/Matrices.java @@ -20,7 +20,7 @@ import java.util.Arrays; import java.util.Objects; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.cs.AxisDirection; import org.opengis.referencing.cs.CoordinateSystem; // For javadoc import org.opengis.referencing.operation.Matrix; @@ -116,7 +116,7 @@ public final class Matrices extends Static { } /** - * Creates a matrix of size {@code numRow} × {@code numCol}. + * Creates a modifiable matrix of size {@code numRow} × {@code numCol}. * Elements on the diagonal (<var>j</var> == <var>i</var>) are set to 1. * The result is an identity matrix if {@code numRow} = {@code numCol}. * diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/matrix/MismatchedMatrixSizeException.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/matrix/MismatchedMatrixSizeException.java index cd69430368..734321256c 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/matrix/MismatchedMatrixSizeException.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/matrix/MismatchedMatrixSizeException.java @@ -16,7 +16,7 @@ */ package org.apache.sis.referencing.operation.matrix; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; /** @@ -30,7 +30,7 @@ import org.opengis.geometry.MismatchedDimensionException; * @author Martin Desruisseaux (Geomatys) * @version 0.4 * - * @see org.opengis.geometry.MismatchedReferenceSystemException + * @see org.opengis.coordinate.MismatchedCoordinateMetadataException * @see org.apache.sis.referencing.operation.MismatchedDatumException * * @since 0.4 diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java index 2076fb52ae..1cca954ddf 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java @@ -24,7 +24,7 @@ import java.awt.geom.AffineTransform; import org.opengis.util.FactoryException; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.parameter.ParameterDescriptorGroup; import org.opengis.parameter.ParameterValueGroup; import org.opengis.referencing.operation.Matrix; diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/AbstractMathTransform1D.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/AbstractMathTransform1D.java index acf59c7e47..f667c33402 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/AbstractMathTransform1D.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/AbstractMathTransform1D.java @@ -17,7 +17,7 @@ package org.apache.sis.referencing.operation.transform; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.operation.Matrix; import org.opengis.referencing.operation.MathTransform1D; import org.opengis.referencing.operation.NoninvertibleTransformException; diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java index 259f16a79b..6012bd937f 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java @@ -23,7 +23,7 @@ import java.io.Serializable; import org.opengis.util.FactoryException; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.parameter.ParameterValueGroup; import org.opengis.parameter.ParameterDescriptorGroup; import org.opengis.referencing.operation.Matrix; diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java index 7c37eb6c01..efb619562f 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java @@ -1603,6 +1603,22 @@ public class DefaultMathTransformFactory extends AbstractFactory implements Math return unique(MathTransforms.linear(matrix)); } + /** + * Creates a modifiable matrix of size {@code numRow} × {@code numCol}. + * Elements on the diagonal (<var>j</var> == <var>i</var>) are set to 1. + * + * @param numRow number of rows. + * @param numCol number of columns. + * @return a new matrix of the given size. + * @throws FactoryException if the matrix creation failed. + * + * @since 1.5 + */ + @Override + public Matrix createMatrix(int numRow, int numCol) throws FactoryException { + return Matrices.createDiagonal(numRow, numCol); + } + /** * Creates a transform by concatenating two existing transforms. * A concatenated transform acts in the same way as applying two transforms, one after the other. diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransform.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransform.java index 32ea94359c..59e0ff464b 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransform.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransform.java @@ -22,7 +22,7 @@ import javax.measure.quantity.Length; import org.opengis.util.FactoryException; import org.opengis.parameter.ParameterDescriptor; import org.opengis.parameter.ParameterDescriptorGroup; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.datum.Ellipsoid; import org.opengis.referencing.operation.Matrix; import org.opengis.referencing.operation.MathTransform; diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/MathTransforms.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/MathTransforms.java index f1c375666a..b9c6511266 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/MathTransforms.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/MathTransforms.java @@ -26,7 +26,7 @@ import javax.measure.UnitConverter; import org.opengis.util.FactoryException; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.operation.Matrix; import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.MathTransform1D; diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/PassThroughTransform.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/PassThroughTransform.java index 603ea104ae..8e46ff6a9f 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/PassThroughTransform.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/PassThroughTransform.java @@ -22,7 +22,7 @@ import java.io.Serializable; import java.lang.reflect.Array; import org.opengis.util.FactoryException; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.operation.Matrix; import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.MathTransformFactory; diff --git a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/transform/MathTransformFactoryBase.java b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/transform/MathTransformFactoryBase.java index e1375f00ba..b8c252b7d0 100644 --- a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/transform/MathTransformFactoryBase.java +++ b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/transform/MathTransformFactoryBase.java @@ -93,6 +93,12 @@ class MathTransformFactoryBase implements MathTransformFactory { throw new FactoryException(MESSAGE); } + /** Default implementation throws an exception. */ + @Override + public Matrix createMatrix(int numRow, int numCol) throws FactoryException { + throw new FactoryException(MESSAGE); + } + /** Default implementation throws an exception. */ @Override public MathTransform createConcatenatedTransform(MathTransform transform1, MathTransform transform2) throws FactoryException { diff --git a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/transform/MathTransformFactoryMock.java b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/transform/MathTransformFactoryMock.java index c9565b5cce..6c8dd22af9 100644 --- a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/transform/MathTransformFactoryMock.java +++ b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/transform/MathTransformFactoryMock.java @@ -30,6 +30,7 @@ import org.opengis.referencing.operation.OperationMethod; import org.opengis.referencing.operation.SingleOperation; import org.apache.sis.referencing.operation.DefaultOperationMethod; import org.apache.sis.referencing.operation.provider.AbstractProvider; +import org.apache.sis.referencing.operation.matrix.Matrices; // Test dependencies import static org.junit.jupiter.api.Assertions.*; @@ -143,6 +144,18 @@ public final class MathTransformFactoryMock implements MathTransformFactory { return MathTransforms.linear(matrix); } + /** + * Delegates to {@link Matrices}. + * + * @param numRow number of rows. + * @param numCol number of columns. + * @return a new matrix of the given size. + */ + @Override + public Matrix createMatrix(int numRow, int numCol) { + return Matrices.createDiagonal(numRow, numCol); + } + /** * Delegates to {@link MathTransforms}. * diff --git a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/transform/MathTransformWrapper.java b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/transform/MathTransformWrapper.java index 2525e3e4c8..0ebfa11054 100644 --- a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/transform/MathTransformWrapper.java +++ b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/transform/MathTransformWrapper.java @@ -23,7 +23,7 @@ import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.MathTransform2D; import org.opengis.referencing.operation.NoninvertibleTransformException; import org.opengis.referencing.operation.TransformException; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.geometry.DirectPosition; import org.apache.sis.io.wkt.Formatter; import org.apache.sis.io.wkt.FormattableObject; diff --git a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/transform/TransformResultComparator.java b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/transform/TransformResultComparator.java index 9045678ea1..6d5cb71cd6 100644 --- a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/transform/TransformResultComparator.java +++ b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/transform/TransformResultComparator.java @@ -19,7 +19,7 @@ package org.apache.sis.referencing.operation.transform; import java.util.Arrays; import org.opengis.util.FactoryException; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.operation.Matrix; import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.MathTransformFactory; 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 317b7e7ee3..1f046935fb 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 @@ -35,7 +35,7 @@ import static java.lang.Math.decrementExact; import static java.lang.Math.toIntExact; import static java.lang.Math.floorDiv; import org.opengis.util.GenericName; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.apache.sis.coverage.grid.GridCoverage; import org.apache.sis.coverage.grid.GridExtent; import org.apache.sis.coverage.grid.DisjointExtentException; diff --git a/endorsed/src/org.apache.sis.util/main/org/apache/sis/math/Line.java b/endorsed/src/org.apache.sis.util/main/org/apache/sis/math/Line.java index 3c88e7a4bd..4f7ca4fcc5 100644 --- a/endorsed/src/org.apache.sis.util/main/org/apache/sis/math/Line.java +++ b/endorsed/src/org.apache.sis.util/main/org/apache/sis/math/Line.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.function.DoubleUnaryOperator; import static java.lang.Double.*; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.apache.sis.util.ArgumentChecks; import org.apache.sis.util.privy.DoubleDouble; import org.apache.sis.util.privy.Numerics; diff --git a/endorsed/src/org.apache.sis.util/main/org/apache/sis/math/Plane.java b/endorsed/src/org.apache.sis.util/main/org/apache/sis/math/Plane.java index e1578ad04d..aa9cbc0b31 100644 --- a/endorsed/src/org.apache.sis.util/main/org/apache/sis/math/Plane.java +++ b/endorsed/src/org.apache.sis.util/main/org/apache/sis/math/Plane.java @@ -24,7 +24,7 @@ import static java.lang.Math.abs; import static java.lang.Math.sqrt; import static java.lang.Math.ulp; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.apache.sis.util.ArgumentChecks; import org.apache.sis.util.privy.DoubleDouble; import org.apache.sis.util.privy.Numerics; diff --git a/endorsed/src/org.apache.sis.util/main/org/apache/sis/util/ArgumentChecks.java b/endorsed/src/org.apache.sis.util/main/org/apache/sis/util/ArgumentChecks.java index d0da9bcc3b..12f17ac4a0 100644 --- a/endorsed/src/org.apache.sis.util/main/org/apache/sis/util/ArgumentChecks.java +++ b/endorsed/src/org.apache.sis.util/main/org/apache/sis/util/ArgumentChecks.java @@ -24,7 +24,7 @@ import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.operation.MathTransform; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.apache.sis.util.privy.Strings; import org.apache.sis.util.resources.Errors; diff --git a/geoapi/snapshot b/geoapi/snapshot index 84a19169e8..098de66054 160000 --- a/geoapi/snapshot +++ b/geoapi/snapshot @@ -1 +1 @@ -Subproject commit 84a19169e8c1e6f2485036b6efb283645be94b97 +Subproject commit 098de66054a7246dbc88aa6740e098695f668d85 diff --git a/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/se1/PresentationToScene2D.java b/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/se1/PresentationToScene2D.java index 66bc6680ad..44d523364e 100644 --- a/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/se1/PresentationToScene2D.java +++ b/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/se1/PresentationToScene2D.java @@ -27,7 +27,7 @@ import java.util.function.Consumer; import java.util.function.Predicate; import java.util.logging.Level; import java.util.stream.Stream; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.operation.NoninvertibleTransformException; import org.opengis.referencing.operation.TransformException; import org.opengis.util.FactoryException; diff --git a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/MapCanvas.java b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/MapCanvas.java index 72375715dc..10f07bddf7 100644 --- a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/MapCanvas.java +++ b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/MapCanvas.java @@ -53,7 +53,7 @@ import javafx.scene.transform.Affine; import javafx.scene.transform.NonInvertibleTransformException; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.ReferenceSystem; import org.opengis.referencing.cs.AxisDirection; import org.opengis.referencing.datum.PixelInCell; diff --git a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/StatusBar.java b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/StatusBar.java index ab66f5da71..33a01910a4 100644 --- a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/StatusBar.java +++ b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/StatusBar.java @@ -59,7 +59,7 @@ import javax.measure.IncommensurableException; import javax.measure.quantity.Length; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; +import org.opengis.coordinate.MismatchedDimensionException; import org.opengis.referencing.ReferenceSystem; import org.opengis.referencing.datum.PixelInCell; import org.opengis.referencing.cs.CoordinateSystem;
