This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits 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 93f2c6c1e2 Add a `Domain` class as the parent class of `GridGeometry`.
Implies renaming of `GridGeometry.getCoordinateReferenceSystem()` to
`ReferenceSystem` for allowing the description of DGGS domain.
93f2c6c1e2 is described below
commit 93f2c6c1e29f67770da648748f008b48e0319586
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Mon Nov 30 18:15:46 2026 +0100
Add a `Domain` class as the parent class of `GridGeometry`.
Implies renaming of `GridGeometry.getCoordinateReferenceSystem()`
to `ReferenceSystem` for allowing the description of DGGS domain.
---
.../main/org/apache/sis/coverage/Domain.java | 91 +++++++++++++
.../org/apache/sis/coverage/RegionOfInterest.java | 2 +-
.../org/apache/sis/coverage/SampleDimension.java | 8 +-
.../sis/coverage/grid/AggregatedGridCoverage.java | 4 +-
.../coverage/grid/CoordinateOperationFinder.java | 4 +-
.../apache/sis/coverage/grid/DimensionReducer.java | 2 +-
.../sis/coverage/grid/DimensionalityReduction.java | 10 +-
.../apache/sis/coverage/grid/GridCRSBuilder.java | 2 +-
.../org/apache/sis/coverage/grid/GridCoverage.java | 6 +-
.../apache/sis/coverage/grid/GridCoverage2D.java | 2 +-
.../sis/coverage/grid/GridCoverageProcessor.java | 4 +-
.../apache/sis/coverage/grid/GridDerivation.java | 14 +-
.../org/apache/sis/coverage/grid/GridExtent.java | 2 +-
.../org/apache/sis/coverage/grid/GridGeometry.java | 146 ++++++++++++---------
.../apache/sis/coverage/grid/ImageRenderer.java | 2 +-
.../sis/coverage/grid/ResampledGridCoverage.java | 4 +-
.../internal/shared/CommonDomainFinder.java | 2 +-
.../main/org/apache/sis/image/PlanarImage.java | 2 +-
.../sis/coverage/grid/DefaultEvaluatorTest.java | 4 +-
.../coverage/grid/DimensionalityReductionTest.java | 8 +-
.../sis/coverage/grid/GridDerivationTest.java | 6 +-
.../apache/sis/coverage/grid/GridGeometryTest.java | 6 +-
.../coverage/grid/ResampledGridCoverageTest.java | 12 +-
.../org/apache/sis/map/coverage/RenderingData.java | 8 +-
.../main/org/apache/sis/portrayal/Canvas.java | 4 +-
.../apache/sis/map/coverage/RenderingDataTest.java | 2 +-
.../sis/storage/geotiff/writer/GeoEncoder.java | 4 +-
.../sis/storage/geotiff/GeoTiffStoreTest.java | 2 +-
.../org/apache/sis/storage/geotiff/ReaderTest.java | 4 +-
.../sis/storage/netcdf/base/GridAdjustment.java | 2 +-
.../sis/storage/netcdf/base/GridMapping.java | 2 +-
.../apache/sis/storage/netcdf/NetcdfStoreTest.java | 2 +-
.../sis/storage/sql/postgis/RasterWriter.java | 2 +-
.../sis/storage/AbstractGridCoverageResource.java | 2 +-
.../sis/storage/MemoryGridCoverageResource.java | 2 +-
.../apache/sis/storage/aggregate/GridSlice.java | 2 +-
.../sis/storage/aggregate/GridSliceLocator.java | 2 +-
.../apache/sis/storage/esri/AsciiGridStore.java | 2 +-
.../apache/sis/storage/image/WorldFileStore.java | 2 +-
.../sis/storage/metadata/MetadataBuilder.java | 2 +-
.../apache/sis/storage/tiling/ImagePyramid.java | 2 +-
.../org/apache/sis/storage/tiling/TileMatrix.java | 2 +-
.../org/apache/sis/storage/CoverageSubsetTest.java | 2 +-
.../main/org/apache/sis/map/service/Scene2D.java | 2 +-
.../sis/map/service/common/CoverageSlices.java | 2 +-
.../sis/map/service/common/GroundSpacing.java | 2 +-
.../apache/sis/map/service/common/MapScale.java | 2 +-
.../sis/map/service/se1/RasterToScene2D.java | 2 +-
.../sis/map/service/GraphicsPortrayerTest.java | 6 +-
.../storage/coverage/BandedCoverageResource.java | 2 +-
.../sis/storage/coverage/CoverageUtilities.java | 2 +-
.../dggs/DiscreteGlobalGridCoverageProcessor.java | 2 +-
.../shared/AbstractDiscreteGlobalGridCoverage.java | 2 +-
.../shared/GridAsDiscreteGlobalGridResource.java | 2 +-
.../shared/IndexedDiscreteGlobalGridCoverage.java | 2 +-
.../org/apache/sis/storage/rs/CodedCoverages.java | 2 +-
.../org/apache/sis/storage/rs/CodedGeometry.java | 2 +-
.../org/apache/sis/storage/rs/CodedResource.java | 2 +-
.../rs/internal/shared/AbstractCodedCoverage.java | 2 +-
.../storage/rs/internal/shared/CodeTransforms.java | 6 +-
.../rs/internal/shared/CompoundCodedResource.java | 4 +-
.../rs/internal/shared/GridAsCodedResource.java | 8 +-
.../rs/internal/shared/ReducedCodedResource.java | 2 +-
.../sis/storage/coveragejson/CoverageResource.java | 2 +-
.../coveragejson/CoverageJsonStoreTest.java | 2 +-
.../apache/sis/gui/coverage/GridSliceSelector.java | 2 +-
.../main/org/apache/sis/gui/map/MapCanvas.java | 4 +-
.../org/apache/sis/gui/map/OperationFinder.java | 6 +-
.../main/org/apache/sis/gui/map/StatusBar.java | 4 +-
.../gui/referencing/RecentReferenceSystems.java | 2 +-
70 files changed, 294 insertions(+), 179 deletions(-)
diff --git
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/Domain.java
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/Domain.java
new file mode 100644
index 0000000000..50ed97a46e
--- /dev/null
+++
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/Domain.java
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.coverage;
+
+import java.util.Optional;
+import java.time.temporal.Temporal;
+import org.opengis.geometry.Envelope;
+import org.opengis.metadata.extent.GeographicBoundingBox;
+import org.opengis.referencing.ReferenceSystem;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.opengis.referencing.gazetteer.ReferenceSystemUsingIdentifiers;
+import org.apache.sis.coverage.grid.IncompleteGridGeometryException;
+
+
+/**
+ * The reference system and extent of a coverage.
+ * This is a description of the inputs expected by a {@link BandedCoverage}.
+ * The outputs are described by {@link SampleDimension}.
+ *
+ * @author Martin Desruisseaux (IRD, Geomatys)
+ * @version 1.8
+ *
+ * @since SIS 1.8
+ */
+public abstract class Domain {
+ /**
+ * Creates a new domain.
+ */
+ protected Domain() {
+ }
+
+ /**
+ * Returns the real world reference system.
+ * This is often a {@linkplain CoordinateReferenceSystem Coordinate
Reference System},
+ * but {@linkplain ReferenceSystemUsingIdentifiers Reference System Using
Identifiers}
+ * is also allowed.
+ *
+ * @return the reference system.
+ * @throws IncompleteGridGeometryException if this domain is a grid
geometry with no <abbr>CRS</abbr>.
+ */
+ public abstract ReferenceSystem getReferenceSystem();
+
+ /**
+ * Returns the bounding box of real world coordinates for this domain.
+ * The envelope encompasses all cell surfaces, from the left border of
leftmost
+ * cell to the right border of the rightmost cell and similarly along
other axes.
+ * If the {@linkplain #getReferenceSystem() reference system of this
domain} is a
+ * {@linkplain CoordinateReferenceSystem Coordinate Reference System}
(<abbr>CRS</abbr>),
+ * then the envelope is associated to the same <abbr>CRS</abbr>.
+ * Otherwise, an arbitrary <abbr>CRS</abbr> is used.
+ *
+ * @return the envelope in real world coordinates.
+ * @throws IncompleteGridGeometryException if this domain is a grid
geometry with no envelope.
+ */
+ public abstract Envelope getEnvelope();
+
+ /**
+ * Returns the approximate latitude and longitude coordinates of the
domain.
+ * The prime meridian is Greenwich, but the geodetic reference frame is
not necessarily <abbr>WGS</abbr> 1984.
+ * This is typically computed from the {@linkplain #getEnvelope()
envelope} if the coordinate reference system
+ * contains an horizontal component such as a geographic or projected
<abbr>CRS</abbr>.
+ *
+ * @return the geographic bounding box in real world coordinates.
+ */
+ public abstract Optional<GeographicBoundingBox> getGeographicExtent();
+
+ /**
+ * Returns the start time and end time of coordinates of the domain.
+ * If the domain has no temporal dimension, then this method returns an
empty array.
+ * If only the start time or end time is defined, then the array has a
length of 1.
+ * Otherwise, this method returns an array of length 2 with the start time
(inclusive)
+ * in the first element and the end time (exclusive) in the last element.
+ *
+ * @return time range as an array of length 0 (if none), 1 or 2.
+ */
+ public abstract Temporal[] getTemporalExtent();
+}
diff --git
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/RegionOfInterest.java
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/RegionOfInterest.java
index f29249ff44..4aa71eac91 100644
---
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/RegionOfInterest.java
+++
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/RegionOfInterest.java
@@ -107,7 +107,7 @@ public class RegionOfInterest implements LenientComparable,
Serializable {
MathTransform tr =
target.getGridToCRS(PixelInCell.CELL_CENTER).inverse();
if (crs != null && target.isDefined(GridGeometry.CRS)) {
final CoordinateOperation op = CRS.findOperation(crs,
- target.getCoordinateReferenceSystem(),
+ target.getReferenceSystem(),
target.getGeographicExtent().orElse(null));
tr = MathTransforms.concatenate(op.getMathTransform(), tr);
}
diff --git
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/SampleDimension.java
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/SampleDimension.java
index 4c0ee738c2..4cd141e917 100644
---
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/SampleDimension.java
+++
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/SampleDimension.java
@@ -57,8 +57,8 @@ import org.opengis.feature.IdentifiedType;
* A sample dimension can reserve some values for <dfn>qualitative</dfn>
information like “this is a forest”
* and some other values for <dfn>quantitative</dfn> information like a
temperature measurements.
*
- * <h2>Example</h2>
- * An image of sea surface temperature (SST) could define the following
categories:
+ * <p><b>Example:</b>
+ * An image of sea surface temperature (SST) could define the following
categories:</p>
* <table class="sis">
* <caption>Example of categories in a sample dimension</caption>
* <tr><th>Values range</th> <th>Meaning</th></tr>
@@ -69,12 +69,12 @@ import org.opengis.feature.IdentifiedType;
* </table>
* In this example, sample values in range [10…210] define a quantitative
category, while all others categories are qualitative.
*
- * <h2>Relationship with metadata</h2>
+ * <h2>Coverage and metadata sample dimensions</h2>
* This class provides the same information as ISO 19115 {@link
org.opengis.metadata.content.SampleDimension},
* but organized in a different way. The use of the same name may seem a risk,
but those two types are typically
* not used at the same time.
*
- * <h2>Definition of missing data</h2>
+ * <h2>Definition of missing data in sample dimensions</h2>
* An important aspect of sample dimensions is the {@linkplain
#getBackground() background value}.
* It defines how to initialize an empty image or canvas with respect to the
sample definition.
* It can be thought as the value for "lack of data" (fill value, no-data,
missing value) category
diff --git
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/AggregatedGridCoverage.java
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/AggregatedGridCoverage.java
index 7f68c4c9b9..8239bd1a80 100644
---
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/AggregatedGridCoverage.java
+++
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/AggregatedGridCoverage.java
@@ -89,14 +89,14 @@ final class AggregatedGridCoverage {
boolean modified = false;
final CoordinateReferenceSystem crs;
if (target.isDefined(GridGeometry.CRS)) {
- crs = target.getCoordinateReferenceSystem();
+ crs = target.getReferenceSystem();
} else {
final var area = new DefaultGeographicBoundingBox();
final var all = new CoordinateReferenceSystem[sources.length];
for (int i=0; i<sources.length; i++) {
final GridGeometry c = sources[i].getGridGeometry();
if (c.isDefined(GridGeometry.CRS)) {
- all[i] = c.getCoordinateReferenceSystem();
+ all[i] = c.getReferenceSystem();
}
c.getGeographicExtent().ifPresent((box) -> {
if (area.isEmpty()) area.setBounds(box);
diff --git
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/CoordinateOperationFinder.java
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/CoordinateOperationFinder.java
index 3d57886698..96af07f576 100644
---
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/CoordinateOperationFinder.java
+++
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/CoordinateOperationFinder.java
@@ -241,7 +241,7 @@ final class CoordinateOperationFinder extends
CoordinateOperationContext {
*/
final void verifyPresenceOfCRS(final boolean rs) {
if ((rs ? target : source).isDefined(GridGeometry.CRS)) {
- if ((rs ? source : target).getCoordinateReferenceSystem() == null)
{
+ if ((rs ? source : target).getReferenceSystem() == null) {
throw new IncompleteGridGeometryException();
}
}
@@ -318,7 +318,7 @@ final class CoordinateOperationFinder extends
CoordinateOperationContext {
*/
final CoordinateReferenceSystem getTargetCRS() {
return (changeOfCRS != null) ? changeOfCRS.getTargetCRS() :
- source.isDefined(GridGeometry.CRS) ?
source.getCoordinateReferenceSystem() : null;
+ source.isDefined(GridGeometry.CRS) ?
source.getReferenceSystem() : null;
}
/**
diff --git
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/DimensionReducer.java
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/DimensionReducer.java
index daa2eebcc5..909404b4f8 100644
---
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/DimensionReducer.java
+++
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/DimensionReducer.java
@@ -175,7 +175,7 @@ final class DimensionReducer {
if (extent != null && gridIndices != null) {
extent = extent.selectDimensions(gridIndices);
}
- reducedCRS =
CRS.selectDimensions(target.getCoordinateReferenceSystem(), dimensions);
+ reducedCRS = CRS.selectDimensions(target.getReferenceSystem(),
dimensions);
final Envelope envelope = apply(target.envelope);
final double[] resolution = apply(target.resolution);
long nonLinears = 0;
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 981a388d74..823ae42548 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
@@ -207,7 +207,7 @@ public class DimensionalityReduction implements
UnaryOperator<GridCoverage>, Ser
crsAxes.flip(0, targetDim);
crsAxesToRemove = toArray(crsAxes);
if (source.isDefined(GridGeometry.CRS)) {
- componentsOfCRS =
filterCRS(source.getCoordinateReferenceSystem(), crsAxes);
+ componentsOfCRS = filterCRS(source.getReferenceSystem(),
crsAxes);
} else {
componentsOfCRS = null;
}
@@ -614,7 +614,7 @@ public class DimensionalityReduction implements
UnaryOperator<GridCoverage>, Ser
*/
private static boolean assertSameCRS(final GridGeometry expected, final
CoordinateReferenceSystem actual) {
if (actual != null && expected.isDefined(GridGeometry.CRS)) {
- final var crs = expected.getCoordinateReferenceSystem();
+ final var crs = expected.getReferenceSystem();
if (crs != null) {
return Utilities.deepEquals(crs, actual, ComparisonMode.DEBUG);
}
@@ -825,9 +825,9 @@ public class DimensionalityReduction implements
UnaryOperator<GridCoverage>, Ser
*/
CoordinateReferenceSystem crs = null;
if (reduced.isDefined(GridGeometry.CRS) &&
sourceGeometry.isDefined(GridGeometry.CRS)) {
- final CoordinateReferenceSystem reducedCRS =
reduced.getCoordinateReferenceSystem();
- if (CRS.equivalent(reducedGeometry.getCoordinateReferenceSystem(),
reducedCRS)) {
- crs = sourceGeometry.getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem reducedCRS =
reduced.getReferenceSystem();
+ if (CRS.equivalent(reducedGeometry.getReferenceSystem(),
reducedCRS)) {
+ crs = sourceGeometry.getReferenceSystem();
} else {
FactoryException cause = null;
try {
diff --git
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridCRSBuilder.java
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridCRSBuilder.java
index abbe468b42..13b123b48b 100644
---
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridCRSBuilder.java
+++
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridCRSBuilder.java
@@ -254,7 +254,7 @@ final class GridCRSBuilder extends
ReferencingFactoryContainer {
fullGrid = grid;
if (grid.isDefined(GridGeometry.CRS | GridGeometry.GRID_TO_CRS)) try {
separator = new
TransformSeparator(grid.getGridToCRS(anchor).inverse());
- return forComponent(name, grid.getCoordinateReferenceSystem(), 0,
0);
+ return forComponent(name, grid.getReferenceSystem(), 0, 0);
} catch (NoninvertibleTransformException e) {
throw new InvalidGeodeticParameterException(illegalGridToCRS(), e);
}
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 61752bc32e..285f1fc8c3 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
@@ -141,14 +141,14 @@ public abstract class GridCoverage extends BandedCoverage
{
* This is the target coordinate reference system of the {@link
GridGeometry#getGridToCRS gridToCRS}
* math transform.
*
- * <p>The default implementation delegates to {@link
GridGeometry#getCoordinateReferenceSystem()}.</p>
+ * <p>The default implementation delegates to {@link
GridGeometry#getReferenceSystem()}.</p>
*
* @return the "real world" CRS of this coverage.
* @throws IncompleteGridGeometryException if the grid geometry has no CRS.
*/
@Override
public CoordinateReferenceSystem getCoordinateReferenceSystem() {
- return gridGeometry.getCoordinateReferenceSystem();
+ return gridGeometry.getReferenceSystem();
}
/**
@@ -536,7 +536,7 @@ public abstract class GridCoverage extends BandedCoverage {
public CoordinateFormat createCoordinateFormat() {
final var cf = new CoordinateFormat();
if (gridGeometry.isDefined(GridGeometry.CRS)) {
- cf.setDefaultCRS(gridGeometry.getCoordinateReferenceSystem());
+ cf.setDefaultCRS(gridGeometry.getReferenceSystem());
}
if (gridGeometry.isDefined(GridGeometry.RESOLUTION)) {
cf.setPrecisions(gridGeometry.getResolution(true));
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 cbf569e0c7..5d07244236 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
@@ -314,7 +314,7 @@ public class GridCoverage2D extends GridCoverage {
if (dimension >= BIDIMENSIONAL) {
CoordinateReferenceSystem crs = null;
if (domain.isDefined(GridGeometry.CRS)) {
- crs = domain.getCoordinateReferenceSystem();
+ crs = domain.getReferenceSystem();
}
final GridExtent extent = createExtent(dimension, bounds, crs);
if (domain.isDefined(GridGeometry.GRID_TO_CRS)) try {
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 da20566246..10fd1896f2 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
@@ -572,7 +572,7 @@ public class GridCoverageProcessor implements Cloneable {
* <td>{@linkplain GridGeometry#getGridToCRS Grid to CRS
transform}</td>
* <td>Whatever it takes for fitting data inside the supplied
extent.</td>
* </tr><tr>
- * <td>{@linkplain GridGeometry#getCoordinateReferenceSystem()
Coordinate reference system}</td>
+ * <td>{@linkplain GridGeometry#getReferenceSystem() Coordinate
reference system}</td>
* <td>Same as source coverage.</td>
* </tr>
* </table>
@@ -697,7 +697,7 @@ public class GridCoverageProcessor implements Cloneable {
* <td>{@linkplain GridGeometry#getGridToCRS Grid to CRS
transform}</td>
* <td>Whatever it takes for fitting data inside the supplied
extent.</td>
* </tr><tr>
- * <td>{@linkplain GridGeometry#getCoordinateReferenceSystem()
Coordinate reference system}</td>
+ * <td>{@linkplain GridGeometry#getReferenceSystem() Coordinate
reference system}</td>
* <td>Same as source coverage.</td>
* </tr>
* </table>
diff --git
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridDerivation.java
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridDerivation.java
index 0c87126181..554da46e3a 100644
---
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridDerivation.java
+++
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridDerivation.java
@@ -491,8 +491,8 @@ public class GridDerivation {
*
* The following information are optional but recommended:
* <ul>
- * <li>{@linkplain GridGeometry#getCoordinateReferenceSystem()
Coordinate reference system} in {@code areaOfInterest}.</li>
- * <li>{@linkplain GridGeometry#getCoordinateReferenceSystem()
Coordinate reference system} in {@link #base} grid.</li>
+ * <li>{@linkplain GridGeometry#getReferenceSystem() Coordinate
reference system} in {@code areaOfInterest}.</li>
+ * <li>{@linkplain GridGeometry#getReferenceSystem() Coordinate
reference system} in {@link #base} grid.</li>
* <li>{@linkplain GridGeometry#getExtent() Extent} in {@link #base}
grid.</li>
* </ul>
*
@@ -699,7 +699,7 @@ public class GridDerivation {
/**
* Requests a grid geometry over a sub-envelope and optionally with a
coarser resolution.
* The given envelope does not need to be expressed in the same coordinate
reference system (<abbr>CRS</abbr>)
- * than {@linkplain GridGeometry#getCoordinateReferenceSystem() the CRS}
of the {@linkplain #base} grid geometry.
+ * than {@linkplain GridGeometry#getReferenceSystem() the CRS} of the
{@linkplain #base} grid geometry.
* Coordinate conversions or transformations will be applied as needed.
* That envelope <abbr>CRS</abbr> may have less dimensions than the
<abbr>CRS</abbr> of the base grid geometry,
* in which case grid dimensions not mapped to envelope dimensions will be
returned unchanged.
@@ -906,7 +906,7 @@ public class GridDerivation {
* @return transform from {@linkplain #base} grid to user argument.
*/
private MathTransform findBaseToAOI(final CoordinateReferenceSystem
target) throws FactoryException {
- final CoordinateReferenceSystem gridCRS =
base.getCoordinateReferenceSystem(); // May throw exception.
+ final CoordinateReferenceSystem gridCRS = base.getReferenceSystem();
// May throw exception.
return CRS.findOperation(gridCRS, target,
base.getGeographicExtent().orElse(null)).getMathTransform();
}
@@ -1130,7 +1130,7 @@ public class GridDerivation {
* without those dimensions, or by assigning the NaN value to some
coordinates.
*
* <h4>Example</h4>
- * If the {@linkplain GridGeometry#getCoordinateReferenceSystem()
coordinate reference system} of base grid geometry has
+ * If the {@linkplain GridGeometry#getReferenceSystem() coordinate
reference system} of base grid geometry has
* (<var>longitude</var>, <var>latitude</var>, <var>time</var>) axes, then
a (<var>longitude</var>, <var>latitude</var>)
* slice at time <var>t</var> can be created with one of the following two
positions:
* <ul>
@@ -1272,7 +1272,7 @@ public class GridDerivation {
* @since SIS 1.6
*/
public GridDerivation selectAxes(int... indices) {
- CoordinateSystem cs =
base.getCoordinateReferenceSystem().getCoordinateSystem();
+ CoordinateSystem cs = base.getReferenceSystem().getCoordinateSystem();
dimensionsToKeepInCRS = GridExtent.verifyDimensions(indices,
cs.getDimension());
return this;
}
@@ -1306,7 +1306,7 @@ public class GridDerivation {
* @since SIS 1.6
*/
public GridDerivation excludeAxes(final Collection<AxisDirection>
exclusion) {
- final CoordinateSystem cs =
base.getCoordinateReferenceSystem().getCoordinateSystem();
+ final CoordinateSystem cs =
base.getReferenceSystem().getCoordinateSystem();
final int dimension = cs.getDimension();
final int[] indices = new int[dimension];
int count = 0;
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 a0402cd3c3..1e728cdfa2 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
@@ -1245,7 +1245,7 @@ public class GridExtent implements GridEnvelope,
LenientComparable, Serializable
* </ul>
*
* Above are only examples; there are no constraints on axis order. In
particular grid axes do not need to be in the same
- * order than the corresponding {@linkplain
GridGeometry#getCoordinateReferenceSystem() coordinate reference system} axes.
+ * order than the corresponding {@linkplain
GridGeometry#getReferenceSystem() coordinate reference system} axes.
*
* @param index the dimension for which to obtain the axis type.
* @return the axis type at the given dimension. May be absent if the type
is unknown.
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 8b1c950242..864c2cdfa5 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
@@ -53,6 +53,7 @@ import org.apache.sis.geometry.AbstractEnvelope;
import org.apache.sis.geometry.GeneralEnvelope;
import org.apache.sis.geometry.ImmutableEnvelope;
import org.apache.sis.geometry.ImmutableDirectPosition;
+import org.apache.sis.coverage.Domain;
import org.apache.sis.coordinate.DefaultCoordinateMetadata;
import org.apache.sis.referencing.IdentifiedObjects;
import org.apache.sis.referencing.crs.AbstractCRS;
@@ -112,7 +113,7 @@ import org.opengis.coordinate.MismatchedDimensionException;
* which may be inferred from the grid extent and the georeferenced
envelope.</li>
* <li>A {@linkplain #getEnvelope() georeferenced envelope}, which can be
inferred
* from the grid extent and the <i>grid to CRS</i> transform.</li>
- * <li>An optional {@linkplain #getCoordinateReferenceSystem() Coordinate
Reference System} (CRS)
+ * <li>An optional {@linkplain #getReferenceSystem() Coordinate Reference
System} (CRS)
* specified as part of the georeferenced envelope.
* This CRS is the target of the <i>grid to CRS</i> transform.</li>
* <li>An <em>estimation</em> of {@link #getResolution(boolean) grid
resolution} along each CRS axes,
@@ -130,12 +131,12 @@ import
org.opengis.coordinate.MismatchedDimensionException;
*
* <h2>Non-linear referencing</h2>
* A key property is the {@linkplain #getGridToCRS(PixelInCell) "grid to CRS"}
conversion,
- * which defines how to map pixel coordinates to "real world" coordinates such
as latitudes and longitudes.
+ * which defines how to map pixel coordinates to real world coordinates such
as latitudes and longitudes.
* This relationship is often linear (an affine transform), but {@linkplain
#isConversionLinear not necessarily};
* {@code GridGeometry} accepts non-linear conversions as well. Non-linear
conversions may occur with images
* using {@linkplain
org.apache.sis.referencing.operation.builder.LocalizationGridBuilder
localization grids},
* but non-linear conversions should not be used for expressing map
projections (projections should be specified
- * in the {@linkplain #getCoordinateReferenceSystem() Coordinate Reference
System} (CRS) instead).
+ * in the {@linkplain #getReferenceSystem() Coordinate Reference System} (CRS)
instead).
*
* <p>Some applications cannot handle non-linear "grid to CRS" conversions.
* For example, encoding an image in a GeoTIFF file is much simpler if the
"grid to CRS" conversion is linear.
@@ -148,9 +149,10 @@ import org.opengis.coordinate.MismatchedDimensionException;
* @author Martin Desruisseaux (IRD, Geomatys)
* @author Johann Sorel (Geomatys)
* @version 1.8
+ *
* @since SIS 1.0
*/
-public class GridGeometry implements LenientComparable, Serializable {
+public class GridGeometry extends Domain implements LenientComparable,
Serializable {
/**
* Serial number for inter-operability with different versions.
*/
@@ -160,7 +162,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
* A bitmask to specify the validity of the Coordinate Reference System
property.
*
* @see #isDefined(int)
- * @see #getCoordinateReferenceSystem()
+ * @see #getReferenceSystem()
*/
public static final int CRS = 1;
@@ -189,7 +191,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
public static final int GRID_TO_CRS = 8;
/**
- * A bitmask to specify the validity of the "real world" coordinates of
cell at indices (0, 0, …, 0).
+ * A bitmask to specify the validity of the real world coordinates of cell
at indices (0, 0, …, 0).
*
* @see #getOrigin()
* @since SIS 1.5
@@ -238,7 +240,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
* The spatiotemporal extent in units of the <abbr>CRS</abbr>, or {@code
null} if unknown.
* If non-null, this envelope is usually the grid {@link #extent}
{@linkplain #gridToCRS transformed}
* to real world coordinates, with the lower coordinates inclusive and the
upper coordinates exclusive.
- * The Coordinate Reference System (CRS) of this envelope defines the
"real world" CRS of this grid geometry.
+ * The Coordinate Reference System (CRS) of this envelope defines the real
world CRS of this grid geometry.
*
* @see #CRS
* @see #ENVELOPE
@@ -247,7 +249,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
protected final ImmutableEnvelope envelope;
/**
- * The conversion from grid indices to "real world" coordinates, or {@code
null} if unknown.
+ * The conversion from grid indices to real world coordinates, or {@code
null} if unknown.
* If non-null, the conversion shall map {@linkplain
PixelInCell#CELL_CENTER cell center}.
* This conversion is usually, but not necessarily, affine.
*
@@ -447,14 +449,14 @@ public class GridGeometry implements LenientComparable,
Serializable {
*/
/**
- * Creates a new grid geometry from a grid extent and a mapping from cell
coordinates to "real world" coordinates.
+ * Creates a new grid geometry from a grid extent and a mapping from cell
coordinates to real world coordinates.
* At least one of {@code extent}, {@code gridToCRS} or {@code crs}
arguments shall be non-null.
* If {@code gridToCRS} is non-null, then {@code anchor} shall be non-null
too with one of the following values:
*
* <ul>
- * <li>{@link PixelInCell#CELL_CENTER} if conversions of cell indices by
{@code gridToCRS} give "real world"
+ * <li>{@link PixelInCell#CELL_CENTER} if conversions of cell indices by
{@code gridToCRS} give real world
* coordinates close to the center of each cell.</li>
- * <li>{@link PixelInCell#CELL_CORNER} if conversions of cell indices by
{@code gridToCRS} give "real world"
+ * <li>{@link PixelInCell#CELL_CORNER} if conversions of cell indices by
{@code gridToCRS} give real world
* coordinates at the corner of each cell. The cell corner is the
one for which all grid indices have the
* smallest values (closest to negative infinity).</li>
* </ul>
@@ -474,8 +476,8 @@ public class GridGeometry implements LenientComparable,
Serializable {
* @param extent the valid extent of grid coordinates, or {@code
null} if unknown.
* @param anchor {@linkplain PixelInCell#CELL_CENTER Cell center} for
OGC conventions or
* {@linkplain PixelInCell#CELL_CORNER cell corner} for
Java2D/JAI conventions.
- * @param gridToCRS the mapping from grid coordinates to "real world"
coordinates, or {@code null} if unknown.
- * @param crs the coordinate reference system of the "real world"
coordinates, or {@code null} if unknown.
+ * @param gridToCRS the mapping from grid coordinates to real world
coordinates, or {@code null} if unknown.
+ * @param crs the coordinate reference system of the real world
coordinates, or {@code null} if unknown.
* @throws NullPointerException if {@code extent}, {@code gridToCRS} and
{@code crs} arguments are all null.
* @throws MismatchedDimensionException if the math transform and the CRS
do not have consistent dimensions.
* @throws IllegalGridGeometryException if the math transform cannot
compute the geospatial envelope or resolution from the grid extent.
@@ -527,7 +529,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
}
/**
- * Creates a new grid geometry from a geospatial envelope and a mapping
from cell coordinates to "real world" coordinates.
+ * Creates a new grid geometry from a geospatial envelope and a mapping
from cell coordinates to real world coordinates.
* At least one of {@code gridToCRS} or {@code envelope} arguments shall
be non-null.
* If {@code gridToCRS} is non-null, then {@code anchor} shall be non-null
too with one of the values documented in the
* {@link #GridGeometry(GridExtent, PixelInCell, MathTransform,
CoordinateReferenceSystem) constructor expecting a grid
@@ -556,7 +558,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
*
* @param anchor {@linkplain PixelInCell#CELL_CENTER Cell center} for
OGC conventions or
* {@linkplain PixelInCell#CELL_CORNER cell corner} for
Java2D/JAI conventions.
- * @param gridToCRS the mapping from grid coordinates to "real world"
coordinates, or {@code null} if unknown.
+ * @param gridToCRS the mapping from grid coordinates to real world
coordinates, or {@code null} if unknown.
* @param envelope the geospatial envelope, including its coordinate
reference system if available.
* There is no guarantee that the envelope actually
stored in the {@code GridGeometry}
* will be equal to this specified envelope.
@@ -650,7 +652,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
* but in such case this constructor will derive a new envelope and a new
CRS from the given envelope.</p>
*
* @param extent the valid extent of grid coordinates, or {@code
null} if unknown.
- * @param envelope the envelope together with CRS of the "real world"
coordinates, or {@code null} if unknown.
+ * @param envelope the envelope together with CRS of the real world
coordinates, or {@code null} if unknown.
* @param orientation high-level description of desired characteristics
of the {@code gridToCRS} transform.
* Ignored (can be null) if {@code envelope} is null.
* @throws NullPointerException if {@code extent} and {@code envelope}
arguments are both null,
@@ -762,7 +764,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
* Creates a grid geometry with only an envelope and its coordinate
reference system.
* The grid geometry has no "grid to <abbr>CRS</abbr>" transform.
*
- * @param envelope the envelope together with CRS of the "real world"
coordinates.
+ * @param envelope the envelope together with CRS of the real world
coordinates.
* @throws IllegalArgumentException if the envelope has no CRS and only
NaN coordinate values.
*
* @since SIS 1.4
@@ -875,7 +877,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
/**
* Returns the number of dimensions of the <em>grid</em>. This is
typically the same
* than the number of {@linkplain #getEnvelope() envelope} dimensions or
the number of
- * {@linkplain #getCoordinateReferenceSystem() coordinate reference
system} dimensions,
+ * {@linkplain #getReferenceSystem() coordinate reference system}
dimensions,
* but not necessarily.
*
* @return the number of grid dimensions.
@@ -940,7 +942,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
}
/**
- * Returns the conversion from grid coordinates to "real world"
coordinates.
+ * Returns the conversion from grid coordinates to real world coordinates.
* The conversion is often an affine transform, but not necessarily.
* Conversions from cell indices to geospatial coordinates can be
performed for example as below:
*
@@ -950,7 +952,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
* DirectPosition aPixelCenter = gridToCRS.transform(indicesOfCell,
null);
* }
*
- * Callers must specify whether they want the "real world" coordinates of
cell center or cell corner.
+ * Callers must specify whether they want the real world coordinates of
cell center or cell corner.
* The cell corner is the one for which all grid indices have the smallest
values (closest to negative infinity).
* As a rule of thumb:
*
@@ -966,7 +968,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
* to always think about wether the desired <i>grid to CRS</i> transform
shall map pixel corner or center.</p>
*
* @param anchor the cell part to map (center or corner).
- * @return the conversion from grid coordinates to "real world"
coordinates (never {@code null}).
+ * @return the conversion from grid coordinates to real world coordinates
(never {@code null}).
* @throws IllegalArgumentException if the given {@code anchor} is not a
known code list value.
* @throws IncompleteGridGeometryException if this grid geometry has no
transform —
* i.e. <code>{@linkplain #isDefined(int) isDefined}({@linkplain
#GRID_TO_CRS})</code> returned {@code false}.
@@ -985,13 +987,13 @@ public class GridGeometry implements LenientComparable,
Serializable {
}
/**
- * Returns a linear approximation of the conversion from grid coordinates
to "real world" coordinates.
+ * Returns a linear approximation of the conversion from grid coordinates
to real world coordinates.
* If the value returned by {@link #getGridToCRS(PixelInCell)} is already
an instance of {@link LinearTransform},
* then it is returned as is. Otherwise this method computes the tangent
of the transform at the grid extent
* {@linkplain GridExtent#getPointOfInterest(PixelInCell) point of
interest} (usually the center of the grid).
*
* @param anchor the cell part to map (center or corner).
- * @return linear approximation of the conversion from grid coordinates to
"real world" coordinates.
+ * @return linear approximation of the conversion from grid coordinates to
real world coordinates.
* @throws IllegalArgumentException if the given {@code anchor} is not a
known code list value.
* @throws IncompleteGridGeometryException if this grid geometry has no
transform,
* or if the transform is non-linear but this grid geometry has no
extent.
@@ -1014,8 +1016,8 @@ public class GridGeometry implements LenientComparable,
Serializable {
*/
/**
- * Returns the "real world" coordinate reference system together with the
data epoch if any.
- * This method is preferable to {@link #getCoordinateReferenceSystem()}
when the <abbr>CRS</abbr> may be dynamic.
+ * Returns the real world coordinate reference system together with the
data epoch if any.
+ * This method is preferable to {@link #getReferenceSystem()} when the
<abbr>CRS</abbr> may be dynamic.
*
* @return the coordinate reference system (never {@code null}) together
with the data epoch if any.
* @throws IncompleteGridGeometryException if this grid geometry has no
<abbr>CRS</abbr> —
@@ -1024,45 +1026,65 @@ public class GridGeometry implements LenientComparable,
Serializable {
* @since SIS 1.6
*/
public CoordinateMetadata getCoordinateMetadata() {
- return new DefaultCoordinateMetadata(getCoordinateReferenceSystem(),
null);
+ return new DefaultCoordinateMetadata(getReferenceSystem(), null);
}
/**
* Returns the coordinate reference system of the given envelope if
defined, or {@code null} if none.
- * Contrary to {@link #getCoordinateReferenceSystem()}, this method does
not throw exception.
+ * Contrary to {@link #getReferenceSystem()}, this method does not throw
exception.
*/
private static CoordinateReferenceSystem
getCoordinateReferenceSystem(final Envelope envelope) {
return (envelope != null) ? envelope.getCoordinateReferenceSystem() :
null;
}
/**
- * Returns the "real world" coordinate reference system.
+ * Returns the real world coordinate reference system.
* This method assumes that the <abbr>CRS</abbr> is static.
* If the <abbr>CRS</abbr> may be dynamic, use {@link
#getCoordinateMetadata()} instead.
*
* @return the coordinate reference system (never {@code null}).
* @throws IncompleteGridGeometryException if this grid geometry has no
<abbr>CRS</abbr> —
* i.e. <code>{@linkplain #isDefined isDefined}({@linkplain
#CRS})</code> returned {@code false}.
+ *
+ * @since SIS 1.8
*/
- public CoordinateReferenceSystem getCoordinateReferenceSystem() {
+ @Override
+ public CoordinateReferenceSystem getReferenceSystem() {
final CoordinateReferenceSystem crs =
getCoordinateReferenceSystem(envelope);
if (crs != null) return crs;
throw incomplete(CRS, Resources.Keys.UnspecifiedCRS);
}
/**
- * Returns the bounding box of "real world" coordinates for this grid
geometry.
- * This envelope is computed from the {@linkplain #getExtent() grid
extent}, which is
- * {@linkplain #getGridToCRS(PixelInCell) transformed} to the "real world"
coordinate system.
- * The initial envelope encompasses all cell surfaces, from the left
border of leftmost cell
- * to the right border of the rightmost cell and similarly along other
axes.
- * If this grid geometry is a {@linkplain GridDerivation#subgrid(Envelope,
double...) subgrid}, then the envelope is also
- * {@linkplain GeneralEnvelope#intersect(Envelope) clipped} to the
envelope of the original (non subsampled) grid geometry.
+ * Returns the real world coordinate reference system.
+ *
+ * @return the coordinate reference system (never {@code null}).
+ *
+ * @deprecated Prefer {@link #getCoordinateMetadata()} for taking in
account the data epoch.
+ * If coordinate metadata is not applicable, use {@link
#getReferenceSystem()} which is the
+ * same as this method but renamed for supporting more generic {@link
Domain} such as
+ * Discrete Global Grid Systems (<abbr>DGGS</abbr>).
+ */
+ @Deprecated(since="1.8", forRemoval=true)
+ public CoordinateReferenceSystem getCoordinateReferenceSystem() {
+ return getReferenceSystem();
+ }
+
+ /**
+ * Returns the bounding box of real world coordinates for this grid
geometry.
+ * This envelope is computed from the {@linkplain #getExtent() grid
extent},
+ * which is {@linkplain #getGridToCRS(PixelInCell) transformed} to the
coordinate reference system.
+ * The envelope encompasses all cell surfaces, from the left border of
leftmost
+ * cell to the right border of the rightmost cell and similarly along
other axes.
+ * If this grid geometry is a {@linkplain GridDerivation#subgrid(Envelope,
double...) subgrid},
+ * then the envelope is also {@linkplain
GeneralEnvelope#intersect(Envelope) clipped}
+ * to the envelope of the original (non subsampled) grid geometry.
*
- * @return the bounding box in "real world" coordinates (never {@code
null}).
+ * @return the envelope in real world coordinates (never {@code null}).
* @throws IncompleteGridGeometryException if this grid geometry has no
envelope —
* i.e. <code>{@linkplain #isDefined(int) isDefined}({@linkplain
#ENVELOPE})</code> returned {@code false}.
*/
+ @Override
public Envelope getEnvelope() {
if (!isEnvelopeUndefined()) {
return envelope;
@@ -1078,12 +1100,12 @@ public class GridGeometry implements LenientComparable,
Serializable {
}
/**
- * Returns the "real world" bounding box of this grid geometry transformed
to the given CRS.
+ * Returns the real world bounding box of this grid geometry transformed
to the given CRS.
* This envelope is computed from the {@linkplain #getExtent() grid
extent} if available,
* or from the {@linkplain #getEnvelope() envelope} otherwise.
*
* @param crs the desired coordinate reference system for the returned
envelope.
- * @return the bounding box in "real world" coordinates (never {@code
null}).
+ * @return the bounding box in real world coordinates (never {@code null}).
* @throws IncompleteGridGeometryException if this grid geometry has no
extent and no envelope.
* @throws TransformException if the envelope cannot be transformed to the
specified CRS.
*
@@ -1140,17 +1162,18 @@ public class GridGeometry implements LenientComparable,
Serializable {
/**
* Returns the approximate latitude and longitude coordinates of the grid.
- * The prime meridian is Greenwich, but the geodetic reference frame is
not necessarily WGS 84.
+ * The prime meridian is Greenwich, but the geodetic reference frame is
not necessarily <abbr>WGS</abbr> 1984.
* This is computed from the {@linkplain #getEnvelope() envelope} if the
coordinate reference system
- * contains an horizontal component such as a geographic or projected CRS.
+ * contains an horizontal component such as a geographic or projected
<abbr>CRS</abbr>.
*
* <p><b><abbr>API</abbr> note:</b>
* This method does not throw {@link IncompleteGridGeometryException}
because the geographic extent
* may be absent even with a complete grid geometry. Grid geometries are
not required to have a
* spatial component on Earth surface, since a raster could be a vertical
profile for example.</p>
*
- * @return the geographic bounding box in "real world" coordinates.
+ * @return the geographic bounding box in real world coordinates.
*/
+ @Override
public Optional<GeographicBoundingBox> getGeographicExtent() {
return Optional.ofNullable(geographicBBox());
}
@@ -1187,14 +1210,15 @@ public class GridGeometry implements LenientComparable,
Serializable {
/**
* Returns the start time and end time of coordinates of the grid.
* If the grid has no temporal dimension, then this method returns an
empty array.
- * If only the start time or end time is defined, then returns an array of
length 1.
- * Otherwise this method returns an array of length 2 with the start time
(inclusive)
+ * If only the start time or end time is defined, then the array has a
length of 1.
+ * Otherwise, this method returns an array of length 2 with the start time
(inclusive)
* in the first element and the end time (exclusive) in the last element.
*
* @return time range as an array of length 0 (if none), 1 or 2.
*
* @see #instantStream(PixelInCell)
*/
+ @Override
public Instant[] getTemporalExtent() {
Instant[] times = timeRange();
if (times.length != 0) {
@@ -1223,7 +1247,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
* All non-constant coordinates are set to NaN. If this method returns a
non-empty value,
* then it is guaranteed to contain at least one non-NaN value.
*
- * <p>The <abbr>CRS</abbr> of the returned position may be {@link
#getCoordinateReferenceSystem()}.
+ * <p>The <abbr>CRS</abbr> of the returned position may be {@link
#getReferenceSystem()}.
* But it may also be a subset of the <abbr>CRS</abbr> components
containing only the components
* having at least one non-NaN value. For example, if only the time
coordinate is constant, then
* the <abbr>CRS</abbr> of the returned position may contain only the
temporal component.</p>
@@ -1291,13 +1315,13 @@ public class GridGeometry implements LenientComparable,
Serializable {
}
/**
- * Returns the "real world" coordinates of the cell at indices (0, 0, … 0).
+ * Returns the real world coordinates of the cell at indices (0, 0, … 0).
* The returned coordinates map the {@linkplain PixelInCell#CELL_CORNER
cell corner}.
* This method computes the origin from the "grid to CRS" transform if
available.
* If that transform is not available, then the minimal coordinate values
of the
* {@linkplain #getEnvelope() envelope} are returned.
*
- * @return the "real world" coordinates of the cell at indices (0, 0, … 0).
+ * @return the real world coordinates of the cell at indices (0, 0, … 0).
* @throws IncompleteGridGeometryException if this grid geometry has no
origin —
* i.e. <code>{@linkplain #isDefined(int) isDefined}({@linkplain
#ORIGIN})</code> returned {@code false}.
*
@@ -1430,7 +1454,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
* is often non-linear, for example with data at 0, 5, 10, 100 and 1000
metres.
*
* @param targets indices of CRS axes. This is not necessarily the same
as indices of grid axes.
- * @return {@code true} if the conversion from grid coordinates to "real
world" coordinates is linear
+ * @return {@code true} if the conversion from grid coordinates to real
world coordinates is linear
* for all the given CRS dimension.
*/
public boolean isConversionLinear(final int... targets) {
@@ -1452,7 +1476,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
* This limit us to 64 dimensions, which is assumed more than enough. Note
that {@code GridGeometry} can
* contain more dimensions provided that index of the last non-linear
dimension is not greater than 64.</p>
*
- * @param gridToCRS the transform to "real world" coordinates, or {@code
null} if unknown.
+ * @param gridToCRS the transform to real world coordinates, or {@code
null} if unknown.
* @return a bitmask of dimensions, or 0 (i.e. conversion assumed fully
linear) if the given transform was null.
*/
private static long findNonLinearTargets(final MathTransform gridToCRS) {
@@ -1590,7 +1614,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
* corresponding getter methods will not throw {@link
IncompleteGridGeometryException}).
* @throws IllegalArgumentException if the specified bitmask is not a
combination of known masks.
*
- * @see #getCoordinateReferenceSystem()
+ * @see #getReferenceSystem()
* @see #getEnvelope()
* @see #getExtent()
* @see #getResolution(boolean)
@@ -1701,11 +1725,11 @@ public class GridGeometry implements LenientComparable,
Serializable {
}
/**
- * Translates grid coordinates by the given number of cells without
changing "real world" coordinates.
+ * Translates grid coordinates by the given number of cells without
changing real world coordinates.
* The returned grid has the same {@linkplain GridExtent#getSize(int)
size} than this grid,
* i.e. both low and high grid coordinates are displaced by the same
number of cells.
* The "grid to CRS" transforms are adjusted accordingly in order to map
to the same
- * "real world" coordinates.
+ * real world coordinates.
*
* <p><b>Number of arguments:</b>
* The {@code translation} array length should be equal to the {@linkplain
#getDimension() number of dimensions}.
@@ -1766,11 +1790,11 @@ public class GridGeometry implements LenientComparable,
Serializable {
}
/**
- * Translates the grid to lower coordinate values of zero without changing
the "real world" coordinates.
+ * Translates the grid to lower coordinate values of zero without changing
the real world coordinates.
* The returned grid has the same {@linkplain GridExtent#getSize(int)
size} than this grid,
* i.e. both low and high grid coordinates are displaced by the same
number of cells.
* The "grid to CRS" transforms are adjusted accordingly in order to map
to the same
- * "real world" coordinates.
+ * real world coordinates.
*
* @return a grid geometry whose lower coordinates are zeros.
* @throws ArithmeticException if the translation results in upper
coordinates that overflow 64-bits integer.
@@ -1785,9 +1809,9 @@ public class GridGeometry implements LenientComparable,
Serializable {
}
/**
- * Returns a grid geometry with the given grid extent, which implies a new
"real world" envelope.
+ * Returns a grid geometry with the given grid extent, which implies a new
real world envelope.
* The "grid to CRS" transforms and the resolution stay the same as this
{@code GridGeometry}.
- * The "real world" envelope is recomputed for the new grid extent using
the "grid to CRS" transforms.
+ * The real world envelope is recomputed for the new grid extent using the
"grid to CRS" transforms.
*
* <p>The given extent is taken verbatim, this method does no clipping.
* The given extent does not need to intersect the extent of this grid
geometry.</p>
@@ -1907,7 +1931,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
* If the cell indices can be related to the real world <abbr>CRS</abbr>
* by the {@linkplain #getGridToCRS grid to <abbr>CRS</abbr>} transform,
* then this method creates {@link DerivedCRS} instances derived from the
- * {@link #getCoordinateReferenceSystem() <abbr>CRS</abbr> of this grid}.
+ * {@linkplain #getReferenceSystem() <abbr>CRS</abbr> of this grid}.
* This strategy makes possible to use the returned <abbr>CRS</abbr> in a
chain of coordinate operations
* created by (for example) {@link
org.apache.sis.referencing.CRS#findOperation CRS.findOperation(…)}.
* Otherwise (if there is no grid to <abbr>CRS</abbr> transform or no
real-world <abbr>CRS</abbr>),
@@ -1957,7 +1981,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
*/
public CoordinateOperation createChangeOfCRS(final
CoordinateReferenceSystem target) throws FactoryException {
ArgumentChecks.ensureNonNull("target", target);
- return findOperation(getCoordinateReferenceSystem(), target,
geographicBBox());
+ return findOperation(getReferenceSystem(), target, geographicBBox());
}
/**
@@ -2000,7 +2024,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
* If the given <abbr>CRS</abbr> is {@code null}, then it is assumed the
same <abbr>CRS</abbr> as this
* grid geometry — that <abbr>CRS</abbr> does not need to be {@linkplain
#isDefined(int) defined}.
* If the given <abbr>CRS</abbr> contains only a subset of the dimensions
of
- * {@linkplain #getCoordinateReferenceSystem() this grid geometry
<abbr>CRS</abbr>},
+ * {@link #getReferenceSystem() this grid geometry <abbr>CRS</abbr>},
* then the stream will iterate only over the necessary grid dimensions.
*
* <p><b>Example:</b> if this grid geometry is multi-dimensional with
horizontal, vertical and temporal axes,
@@ -2097,7 +2121,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
public Stream<Instant> instantStream(final PixelInCell anchor) throws
FactoryException {
GridExtent slice = getExtent(); // Cause an exception early if
this information is missing.
MathTransform tr = getGridToCRS(anchor);
- final CoordinateReferenceSystem crs = getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem crs = getReferenceSystem();
final TemporalAccessor t = TemporalAccessor.of(crs);
if (t == null) {
return Stream.empty();
@@ -2235,7 +2259,7 @@ public class GridGeometry implements LenientComparable,
Serializable {
}
// Fallback used only if there is no grid extent.
var source = AbstractEnvelope.castOrCopy(getEnvelope());
- var target = other.getEnvelope(getCoordinateReferenceSystem());
+ var target = other.getEnvelope(getReferenceSystem());
return intersects ? source.intersects(target) :
source.contains(target);
} catch (TransformException e) {
recoverableException(intersects ? "intersects" : "contains", e);
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 36c9b87e77..7e7f64c3bd 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
@@ -431,7 +431,7 @@ public class ImageRenderer {
*
* <ul>
* <li>The {@linkplain GridGeometry#getDimension() number of grid
dimensions} is always 2.</li>
- * <li>The number of {@linkplain
GridGeometry#getCoordinateReferenceSystem() CRS} dimensions
+ * <li>The number of {@linkplain GridGeometry#getReferenceSystem() CRS}
dimensions
* is specified by {@code dimCRS} (usually 2).</li>
* <li>The {@linkplain GridGeometry#getEnvelope() envelope} may be a
sub-region of the coverage envelope.</li>
* <li>The {@linkplain GridGeometry#getExtent() grid extent} is the
{@linkplain #getBounds() image bounds}.</li>
diff --git
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/ResampledGridCoverage.java
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/ResampledGridCoverage.java
index 6187164bc7..a0eed5e838 100644
---
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/ResampledGridCoverage.java
+++
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/ResampledGridCoverage.java
@@ -231,8 +231,8 @@ final class ResampledGridCoverage extends
DerivedGridCoverage {
|| Utilities.equalsIgnoreMetadata(sourceGG.getExtent(),
targetGG.getExtent()))
&& (!isDefined(sourceGG, targetGG, GridGeometry.CRS)
- || CRS.equivalent(sourceGG.getCoordinateReferenceSystem(),
- targetGG.getCoordinateReferenceSystem()))
+ || CRS.equivalent(sourceGG.getReferenceSystem(),
+ targetGG.getReferenceSystem()))
&& (!isDefined(sourceGG, targetGG, GridGeometry.GRID_TO_CRS)
||
Utilities.equalsIgnoreMetadata(sourceGG.getGridToCRS(PixelInCell.CELL_CORNER),
targetGG.getGridToCRS(PixelInCell.CELL_CORNER))
diff --git
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/internal/shared/CommonDomainFinder.java
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/internal/shared/CommonDomainFinder.java
index 01b2a5ce33..c27b811beb 100644
---
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/internal/shared/CommonDomainFinder.java
+++
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/internal/shared/CommonDomainFinder.java
@@ -276,7 +276,7 @@ public final class CommonDomainFinder {
reference = item;
}
if (item.isDefined(GridGeometry.CRS)) {
- final CoordinateReferenceSystem src =
item.getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem src =
item.getReferenceSystem();
if (crs == null) {
crs = src;
} else {
diff --git
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/image/PlanarImage.java
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/image/PlanarImage.java
index 153bb6c39e..2fd866244b 100644
---
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/image/PlanarImage.java
+++
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/image/PlanarImage.java
@@ -157,7 +157,7 @@ public abstract class PlanarImage implements RenderedImage {
*
* <ul>
* <li>The {@linkplain GridGeometry#getDimension() number of grid
dimensions} is always 2.</li>
- * <li>The number of {@linkplain
GridGeometry#getCoordinateReferenceSystem() CRS} dimensions is always 2.</li>
+ * <li>The number of {@linkplain GridGeometry#getReferenceSystem()
<abbr>CRS</abbr>} dimensions is always 2.</li>
* <li>The {@linkplain GridGeometry#getExtent() grid extent} is the
{@linkplain #getBounds() image bounds}.</li>
* <li>The {@linkplain GridGeometry#getGridToCRS grid to CRS} map pixel
coordinates to "real world" coordinates
* (always two-dimensional).</li>
diff --git
a/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/DefaultEvaluatorTest.java
b/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/DefaultEvaluatorTest.java
index 26234b75a5..bf8d54f106 100644
---
a/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/DefaultEvaluatorTest.java
+++
b/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/DefaultEvaluatorTest.java
@@ -153,7 +153,7 @@ public final class DefaultEvaluatorTest extends TestCase {
*/
private MathTransform gridToCRS(final CoordinateReferenceSystem crs)
throws TransformException {
try {
- CoordinateSystem coverageCS =
gridGeometry.getCoordinateReferenceSystem().getCoordinateSystem();
+ CoordinateSystem coverageCS =
gridGeometry.getReferenceSystem().getCoordinateSystem();
Matrix swap =
CoordinateSystems.swapAndScaleAxes(crs.getCoordinateSystem(), coverageCS);
return MathTransforms.concatenate(gridGeometry.gridToCRS,
MathTransforms.linear(swap).inverse());
} catch (IncommensurableException e) {
@@ -176,7 +176,7 @@ public final class DefaultEvaluatorTest extends TestCase {
final float lowerY = gridGeometry.extent.getLow(1);
final float[] gridCoords = new float[2];
MathTransform gridToCRS = gridGeometry.gridToCRS;
- CoordinateReferenceSystem crs =
gridGeometry.getCoordinateReferenceSystem();
+ CoordinateReferenceSystem crs = gridGeometry.getReferenceSystem();
expectedValues = new float[numPoints];
/*
* Prepare in advance the indexes of points to put outside the
coverage.
diff --git
a/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/DimensionalityReductionTest.java
b/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/DimensionalityReductionTest.java
index 9c009909c7..e8a64c4c99 100644
---
a/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/DimensionalityReductionTest.java
+++
b/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/DimensionalityReductionTest.java
@@ -113,7 +113,7 @@ public final class DimensionalityReductionTest extends
TestCase {
*/
private static CoordinateReferenceSystem verifyGridToCRS(final
GridGeometry test, final Matrix expected) {
assertGridToCornerEquals(expected, test);
- return test.getCoordinateReferenceSystem();
+ return test.getReferenceSystem();
}
/**
@@ -161,7 +161,7 @@ public final class DimensionalityReductionTest extends
TestCase {
0, 0, 0, 7, 60002,
0, 0, 0, 0, 1}));
-
assertSame(reduction.getSourceGridGeometry().getCoordinateReferenceSystem(),
crs);
+ assertSame(reduction.getSourceGridGeometry().getReferenceSystem(),
crs);
testPosition(reduction, new double[] {100, 101, 102, 103}, new
double[] {100, 101, 103});
}
@@ -172,7 +172,7 @@ public final class DimensionalityReductionTest extends
TestCase {
public void testSelect() {
var reduction = DimensionalityReduction.select2D(linearGrid());
assertGridToCornerEquals(withHorizontal(),
reduction.getReducedGridGeometry());
- assertSame(HardCodedCRS.WGS84,
reduction.getReducedGridGeometry().getCoordinateReferenceSystem());
+ assertSame(HardCodedCRS.WGS84,
reduction.getReducedGridGeometry().getReferenceSystem());
GridGeometry test = reduction.reverse(createGridGeometry(
new long[] {380, 100},
@@ -190,7 +190,7 @@ public final class DimensionalityReductionTest extends
TestCase {
/*
* CRS should have different axis order.
*/
- var sourceCRS =
reduction.getSourceGridGeometry().getCoordinateReferenceSystem();
+ var sourceCRS = reduction.getSourceGridGeometry().getReferenceSystem();
assertFalse(CRS.equivalent(sourceCRS, crs));
assertTrue(Utilities.deepEquals(test, test,
ComparisonMode.ALLOW_VARIANT)); // Ignore axis order.
testPosition(reduction, new double[] {100, 101, 102, 103}, new
double[] {100, 101});
diff --git
a/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/GridDerivationTest.java
b/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/GridDerivationTest.java
index 2b55ea68fd..1598e92aba 100644
---
a/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/GridDerivationTest.java
+++
b/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/GridDerivationTest.java
@@ -288,7 +288,7 @@ public final class GridDerivationTest extends TestCase {
envelope.setRange(1, -50, +30);
envelope.setRange(0, 8, 12);
grid = grid.derive().subgrid(envelope, 2, 1).build();
- assertSame(HardCodedCRS.WGS84_LATITUDE_FIRST,
grid.getCoordinateReferenceSystem());
+ assertSame(HardCodedCRS.WGS84_LATITUDE_FIRST,
grid.getReferenceSystem());
assertExtentEquals(new long[] {94, 40}, new long[] {95, 119},
grid.getExtent());
/*
* Before to check envelope, we need to restore the same axis order as
specified in the grid geometry.
@@ -777,7 +777,7 @@ public final class GridDerivationTest extends TestCase {
GridGeometry projected =
grid.derive().excludeAxes(Set.of(AxisDirection.UP)).build();
assertNotSame(grid, projected);
assertEquals(2, projected.getDimension());
- assertTrue(CRS.equivalent(HardCodedCRS.WGS84,
projected.getCoordinateReferenceSystem()));
+ assertTrue(CRS.equivalent(HardCodedCRS.WGS84,
projected.getReferenceSystem()));
final long[] expectedLow = {336, 20};
final long[] expectedHigh = {401, 419};
assertExtentEquals(expectedLow, expectedHigh, projected.getExtent());
@@ -1049,7 +1049,7 @@ public final class GridDerivationTest extends TestCase {
request.setRect(25, -5, 90, 100);
grid2 = new GridGeometry(request);
subgrid = grid1.derive().subgrid(grid2).build();
- assertSame(HardCodedCRS.WGS84, subgrid.getCoordinateReferenceSystem());
+ assertSame(HardCodedCRS.WGS84, subgrid.getReferenceSystem());
assertEnvelopeOnly(subgrid);
assertEnvelopeEquals(expected, subgrid.getEnvelope());
}
diff --git
a/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/GridGeometryTest.java
b/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/GridGeometryTest.java
index 53a37abe7d..786135d482 100644
---
a/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/GridGeometryTest.java
+++
b/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/GridGeometryTest.java
@@ -273,7 +273,7 @@ public final class GridGeometryTest extends TestCase {
* be different than the envelope computed above if the "grid to CRS"
transform is not correctly adjusted.
*/
final GridGeometry alternative = new GridGeometry(grid.getExtent(),
PixelInCell.CELL_CENTER,
- grid.getGridToCRS(PixelInCell.CELL_CENTER),
grid.getCoordinateReferenceSystem());
+ grid.getGridToCRS(PixelInCell.CELL_CENTER),
grid.getReferenceSystem());
assertEnvelopeEquals(expected, alternative.getEnvelope());
verifyGridToCRS(grid);
}
@@ -752,7 +752,7 @@ public final class GridGeometryTest extends TestCase {
GridGeometry reduced = grid.selectDimensions(0, 1);
assertNotSame(grid, reduced);
assertExtentEquals(new long[] {336, 20}, new long[] {401, 419},
reduced.getExtent());
- assertSame(HardCodedCRS.WGS84, reduced.getCoordinateReferenceSystem(),
"CRS");
+ assertSame(HardCodedCRS.WGS84, reduced.getReferenceSystem(), "CRS");
assertArrayEquals(new double[] {-90, -180}, reduced.getOrigin(),
"origin");
assertArrayEquals(new double[] {0.5, 0.5},
reduced.getResolution(false), "resolution");
assertGridToCornerEquals(new Matrix3(0, 0.5, -90,
@@ -764,7 +764,7 @@ public final class GridGeometryTest extends TestCase {
reduced = grid.selectDimensions(2);
assertNotSame(grid, reduced);
assertExtentEquals(new long[] {4}, new long[] {10},
reduced.getExtent());
- assertSame(HardCodedCRS.GRAVITY_RELATED_HEIGHT,
reduced.getCoordinateReferenceSystem(), "CRS");
+ assertSame(HardCodedCRS.GRAVITY_RELATED_HEIGHT,
reduced.getReferenceSystem(), "CRS");
assertArrayEquals(new double[] {3}, reduced.getOrigin(), "origin");
assertArrayEquals(new double[] {2}, reduced.getResolution(false),
"resolution");
assertGridToCornerEquals(new Matrix2(2, 3, 0, 1), reduced);
diff --git
a/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/ResampledGridCoverageTest.java
b/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/ResampledGridCoverageTest.java
index 4239d39f64..6819ac9168 100644
---
a/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/ResampledGridCoverageTest.java
+++
b/endorsed/src/org.apache.sis.feature/test/org/apache/sis/coverage/grid/ResampledGridCoverageTest.java
@@ -280,7 +280,7 @@ public final class ResampledGridCoverageTest extends
TestCase {
public void testExplicitIdentity() throws TransformException {
final GridCoverage2D source = createCoverage2D();
GridGeometry gg = source.getGridGeometry();
- gg = new GridGeometry(null, CELL_CENTER, gg.getGridToCRS(CELL_CENTER),
gg.getCoordinateReferenceSystem());
+ gg = new GridGeometry(null, CELL_CENTER, gg.getGridToCRS(CELL_CENTER),
gg.getReferenceSystem());
final GridCoverage target = resample(source, gg);
assertSame(source, target, "Identity transform should result in same
coverage.");
assertContentEquals(source, target);
@@ -297,7 +297,7 @@ public final class ResampledGridCoverageTest extends
TestCase {
public void testImplicitIdentity() throws TransformException {
final GridCoverage2D source = createCoverage2D();
GridGeometry gg = source.getGridGeometry();
- gg = new GridGeometry(null, CELL_CENTER, null,
gg.getCoordinateReferenceSystem());
+ gg = new GridGeometry(null, CELL_CENTER, null,
gg.getReferenceSystem());
final GridCoverage target = resample(source, gg);
assertSame(source, target, "Identity transform should result in same
coverage.");
assertContentEquals(source, target);
@@ -323,7 +323,7 @@ public final class ResampledGridCoverageTest extends
TestCase {
* The envelope is BOX(20 15, 80 77). Evaluate a single point inside
that envelope.
* The result for identical "real world" coordinates should be the
same for both coverages.
*/
- final DirectPosition2D p = new
DirectPosition2D(sourceGG.getCoordinateReferenceSystem(), 50, 30);
+ final DirectPosition2D p = new
DirectPosition2D(sourceGG.getReferenceSystem(), 50, 30);
assertArrayEquals(source.evaluator().apply(p),
target.evaluator().apply(p));
}
@@ -404,7 +404,7 @@ public final class ResampledGridCoverageTest extends
TestCase {
final GridCoverage source = createCoverageND(true);
final GridGeometry target =
createGridGeometryND(HardCodedCRS.WGS84_4D_TIME_FIRST, 1, 2, 3, 0, false);
final GridCoverage result = resample(source, target);
-
assertAxisDirectionsEqual(result.getGridGeometry().getCoordinateReferenceSystem().getCoordinateSystem(),
+
assertAxisDirectionsEqual(result.getGridGeometry().getReferenceSystem().getCoordinateSystem(),
new AxisDirection[] {AxisDirection.FUTURE, AxisDirection.EAST,
AxisDirection.NORTH, AxisDirection.UP},
"Expected (t,λ,φ,H) axes.");
@@ -425,7 +425,7 @@ public final class ResampledGridCoverageTest extends
TestCase {
new GridExtent(null, new long[] {LX+2, LY+2, gridZ},
new long[] {LX+5, LY+5, gridZ}, true),
CELL_CENTER, sourceGeom.gridToCRS,
- sourceGeom.getCoordinateReferenceSystem());
+ sourceGeom.getReferenceSystem());
final GridCoverage result = resample(source, targetGeom);
assertEquals(targetGeom, result.getGridGeometry());
@@ -467,7 +467,7 @@ public final class ResampledGridCoverageTest extends
TestCase {
final GridGeometry targetGeom = new GridGeometry(
targetExtent, CELL_CENTER,
sourceGeom.getGridToCRS(CELL_CENTER),
- sourceGeom.getCoordinateReferenceSystem());
+ sourceGeom.getReferenceSystem());
final GridCoverage result = resample(source, targetGeom);
final int height = (int) targetExtent.getSize(1);
diff --git
a/endorsed/src/org.apache.sis.portrayal/main/org/apache/sis/map/coverage/RenderingData.java
b/endorsed/src/org.apache.sis.portrayal/main/org/apache/sis/map/coverage/RenderingData.java
index 655bc8db68..4d3c09c38c 100644
---
a/endorsed/src/org.apache.sis.portrayal/main/org/apache/sis/map/coverage/RenderingData.java
+++
b/endorsed/src/org.apache.sis.portrayal/main/org/apache/sis/map/coverage/RenderingData.java
@@ -445,8 +445,8 @@ public class RenderingData implements CloneAccess {
if (old != null && cornerToObjective != null && objectiveToCenter !=
null) {
MathTransform toNew = null, toOld = null;
if (old.isDefined(GridGeometry.CRS) &&
isDefined(GridGeometry.CRS)) {
- final CoordinateReferenceSystem oldCRS =
old.getCoordinateReferenceSystem();
- final CoordinateReferenceSystem newCRS =
dataGeometry.getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem oldCRS =
old.getReferenceSystem();
+ final CoordinateReferenceSystem newCRS =
dataGeometry.getReferenceSystem();
if (newCRS != oldCRS) { // Quick check for the
vast majority of cases.
/*
* Transform computed below should always be the identity
transform,
@@ -598,7 +598,7 @@ public class RenderingData implements CloneAccess {
*/
public final void setObjectiveCRS(final CoordinateReferenceSystem
objectiveCRS) throws TransformException {
if (changeOfCRS == null && objectiveCRS != null &&
isDefined(GridGeometry.CRS)) try {
- changeOfCRS =
CRS.findOperation(dataGeometry.getCoordinateReferenceSystem(), objectiveCRS,
+ changeOfCRS = CRS.findOperation(dataGeometry.getReferenceSystem(),
objectiveCRS,
dataGeometry.getGeographicExtent().orElse(null));
final double accuracy = CRS.getLinearAccuracy(changeOfCRS);
processor.setPositionalAccuracyHints(
@@ -909,7 +909,7 @@ public class RenderingData implements CloneAccess {
*/
private String getCRSName() {
if (isDefined(GridGeometry.CRS)) {
- String name =
IdentifiedObjects.getDisplayName(dataGeometry.getCoordinateReferenceSystem(),
locale);
+ String name =
IdentifiedObjects.getDisplayName(dataGeometry.getReferenceSystem(), locale);
if (name != null) {
return name;
}
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 c18f128afc..812f32e208 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
@@ -956,7 +956,7 @@ public class Canvas extends Observable implements Localized
{
* <th>Display dimensions</th>
* <th>Supplemental dimensions</th>
* </tr><tr>
- * <td>{@link GridGeometry#getCoordinateReferenceSystem()}</td>
+ * <td>{@link GridGeometry#getReferenceSystem()}</td>
* <td>{@link #getObjectiveCRS()}.</td>
* <td>Some of <code>{@linkplain #getPointOfInterest(boolean)
*
getPointOfInterest}(false).getCoordinateReferenceSystem()</code></td>
@@ -1095,7 +1095,7 @@ public class Canvas extends Observable implements
Localized {
final CoordinateReferenceSystem crs;
final GeneralDirectPosition newPOI;
if (newValue.isDefined(GridGeometry.CRS)) {
- crs = newValue.getCoordinateReferenceSystem();
+ crs = newValue.getReferenceSystem();
newPOI = new GeneralDirectPosition(crs);
} else {
crs = null;
diff --git
a/endorsed/src/org.apache.sis.portrayal/test/org/apache/sis/map/coverage/RenderingDataTest.java
b/endorsed/src/org.apache.sis.portrayal/test/org/apache/sis/map/coverage/RenderingDataTest.java
index a2b2376352..be7f7507b2 100644
---
a/endorsed/src/org.apache.sis.portrayal/test/org/apache/sis/map/coverage/RenderingDataTest.java
+++
b/endorsed/src/org.apache.sis.portrayal/test/org/apache/sis/map/coverage/RenderingDataTest.java
@@ -197,7 +197,7 @@ public final class RenderingDataTest extends TestCase {
final double scaleX = RENDERED_WIDTH / ENVELOPE_WIDTH;
final double scaleY = RENDERED_HEIGHT / ENVELOPE_HEIGHT; //
Negative.
final var objectiveToDisplay = new AffineTransform2D(scaleX, 0, 0,
scaleY, WEST_BOUND * -scaleX, NORTH_BOUND * -scaleY);
- final CoordinateReferenceSystem objectiveCRS =
domain.getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem objectiveCRS =
domain.getReferenceSystem();
final var poi = new DirectPosition2D(objectiveCRS, WEST_BOUND +
ENVELOPE_WIDTH / 2,
NORTH_BOUND +
ENVELOPE_HEIGHT / 2);
/*
diff --git
a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/writer/GeoEncoder.java
b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/writer/GeoEncoder.java
index 341d7b3980..f8034c3c89 100644
---
a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/writer/GeoEncoder.java
+++
b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/writer/GeoEncoder.java
@@ -333,7 +333,7 @@ public final class GeoEncoder {
writeModelType(GeoCodes.undefined);
return;
}
- final CoordinateReferenceSystem crs =
horizontal.getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem crs = horizontal.getReferenceSystem();
axisDirections =
CoordinateSystems.getSimpleAxisDirections(crs.getCoordinateSystem());
if (crs instanceof ProjectedCRS) {
writeCRS((ProjectedCRS) crs);
@@ -349,7 +349,7 @@ public final class GeoEncoder {
* Write the vertical component of the CRS, if any. We restrict the
type to `VerticalCRS`,
* because this is the semantic of the GeoKeys.
*/
- final CoordinateReferenceSystem fullCRS =
grid.getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem fullCRS = grid.getReferenceSystem();
final VerticalCRS vertical = CRS.getVerticalComponent(fullCRS, true);
if (vertical != null) {
final VerticalCS cs = vertical.getCoordinateSystem();
diff --git
a/endorsed/src/org.apache.sis.storage.geotiff/test/org/apache/sis/storage/geotiff/GeoTiffStoreTest.java
b/endorsed/src/org.apache.sis.storage.geotiff/test/org/apache/sis/storage/geotiff/GeoTiffStoreTest.java
index 60201ab9cf..80db0b2b65 100644
---
a/endorsed/src/org.apache.sis.storage.geotiff/test/org/apache/sis/storage/geotiff/GeoTiffStoreTest.java
+++
b/endorsed/src/org.apache.sis.storage.geotiff/test/org/apache/sis/storage/geotiff/GeoTiffStoreTest.java
@@ -147,7 +147,7 @@ public final class GeoTiffStoreTest extends
DataStoreTestCase {
GridCoverageResource r =
assertSingleton(assertInstanceOf(GeoTiffStore.class, store).components());
GridGeometry gg = r.getGridGeometry();
assertEquals(3, gg.getDimension());
-
assertAxisDirectionsEqual(gg.getCoordinateReferenceSystem().getCoordinateSystem(),
+
assertAxisDirectionsEqual(gg.getReferenceSystem().getCoordinateSystem(),
AxisDirection.EAST, AxisDirection.NORTH,
AxisDirection.DOWN);
assertGridToCornerEquals(
diff --git
a/endorsed/src/org.apache.sis.storage.geotiff/test/org/apache/sis/storage/geotiff/ReaderTest.java
b/endorsed/src/org.apache.sis.storage.geotiff/test/org/apache/sis/storage/geotiff/ReaderTest.java
index 1a6b96cf4e..170a310990 100644
---
a/endorsed/src/org.apache.sis.storage.geotiff/test/org/apache/sis/storage/geotiff/ReaderTest.java
+++
b/endorsed/src/org.apache.sis.storage.geotiff/test/org/apache/sis/storage/geotiff/ReaderTest.java
@@ -126,14 +126,14 @@ public class ReaderTest extends TestCase {
private void readAndVerify(final boolean tiled, final String filename)
throws DataStoreException {
try (GeoTiffStore ds = createStore(filename)) {
final GridCoverageResource resource =
assertInstanceOf(GridCoverageResource.class, assertSingleton(ds.components()));
- assertInstanceOf(ProjectedCRS.class,
resource.getGridGeometry().getCoordinateReferenceSystem());
+ assertInstanceOf(ProjectedCRS.class,
resource.getGridGeometry().getReferenceSystem());
if (!tiled) {
assertTrue(assertInstanceOf(TiledResource.class,
resource).getTileMatrixSets().isEmpty());
return;
}
final String name = filename.substring(0,
filename.lastIndexOf('.'));
final TileMatrixSet pyramid =
assertSingleton(assertInstanceOf(TiledResource.class,
resource).getTileMatrixSets());
-
assertSame(resource.getGridGeometry().getCoordinateReferenceSystem(),
pyramid.getCoordinateReferenceSystem());
+ assertSame(resource.getGridGeometry().getReferenceSystem(),
pyramid.getCoordinateReferenceSystem());
assertEquals(name + ":1:TMS", pyramid.getIdentifier().toString());
assertFalse(pyramid.getEnvelope().isEmpty());
diff --git
a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/GridAdjustment.java
b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/GridAdjustment.java
index 1f4b6ea9a6..0f4099d662 100644
---
a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/GridAdjustment.java
+++
b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/GridAdjustment.java
@@ -197,6 +197,6 @@ public final class GridAdjustment {
final LinearTransform scale = MathTransforms.scale(dataToGridIndices);
gridToCRS = MathTransforms.concatenate(scale, gridToCRS);
return new GridGeometry(extent, anchor, gridToCRS,
- geometry.isDefined(GridGeometry.CRS) ?
geometry.getCoordinateReferenceSystem() : null);
+ geometry.isDefined(GridGeometry.CRS) ?
geometry.getReferenceSystem() : null);
}
}
diff --git
a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/GridMapping.java
b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/GridMapping.java
index 8b6dd3dbd8..75513cfec5 100644
---
a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/GridMapping.java
+++
b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/GridMapping.java
@@ -988,7 +988,7 @@ final class GridMapping {
anchor = anchorFromConvention;
}
final CoordinateReferenceSystem implicitCRS =
- implicit.isDefined(GridGeometry.CRS) ?
implicit.getCoordinateReferenceSystem() : null;
+ implicit.isDefined(GridGeometry.CRS) ?
implicit.getReferenceSystem() : null;
final MathTransform implicitG2C =
implicit.isDefined(GridGeometry.GRID_TO_CRS) ?
implicit.getGridToCRS(anchor) : null;
/*
diff --git
a/endorsed/src/org.apache.sis.storage.netcdf/test/org/apache/sis/storage/netcdf/NetcdfStoreTest.java
b/endorsed/src/org.apache.sis.storage.netcdf/test/org/apache/sis/storage/netcdf/NetcdfStoreTest.java
index e8c9b7060e..96e3af4242 100644
---
a/endorsed/src/org.apache.sis.storage.netcdf/test/org/apache/sis/storage/netcdf/NetcdfStoreTest.java
+++
b/endorsed/src/org.apache.sis.storage.netcdf/test/org/apache/sis/storage/netcdf/NetcdfStoreTest.java
@@ -146,7 +146,7 @@ public final class NetcdfStoreTest extends
DataStoreTestCase {
assertEquals(3, gridToCRS.getTargetDimensions());
assertFalse(gridToCRS instanceof LinearTransform);
- final CoordinateReferenceSystem crs =
gg.getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem crs = gg.getReferenceSystem();
assertInstanceOf(ProjectedCRS.class,
CRS.getHorizontalComponent(crs));
assertNotNull(CRS.getTemporalComponent(crs));
}
diff --git
a/endorsed/src/org.apache.sis.storage.sql/main/org/apache/sis/storage/sql/postgis/RasterWriter.java
b/endorsed/src/org.apache.sis.storage.sql/main/org/apache/sis/storage/sql/postgis/RasterWriter.java
index eaefb886dd..643990db6d 100644
---
a/endorsed/src/org.apache.sis.storage.sql/main/org/apache/sis/storage/sql/postgis/RasterWriter.java
+++
b/endorsed/src/org.apache.sis.storage.sql/main/org/apache/sis/storage/sql/postgis/RasterWriter.java
@@ -120,7 +120,7 @@ public final class RasterWriter extends RasterFormat {
*/
public void setGridToCRS(final GridGeometry gg) throws Exception {
if (gg.isDefined(GridGeometry.CRS)) {
- final CoordinateReferenceSystem crs =
gg.getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem crs = gg.getReferenceSystem();
/*
* If there is connection to `spatialRefSys` table, use EPSG code.
* Otherwise use EPSG code only as a starting point, ignoring axis
order,
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 ebd5d3c82c..45fdec693b 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
@@ -166,7 +166,7 @@ public abstract class AbstractGridCoverageResource extends
AbstractResource impl
double[] resolution = domain.getResolution(true);
if (domain.isDefined(GridGeometry.EXTENT | GridGeometry.GRID_TO_CRS |
GridGeometry.CRS)) try {
CoordinateOperation op = lastOperation;
- if (op == null ||
!domain.getCoordinateReferenceSystem().equals(op.getSourceCRS())) {
+ if (op == null ||
!domain.getReferenceSystem().equals(op.getSourceCRS())) {
/*
* The resolution in the user supplied domain is associated
with a CRS different than the CRS
* of the last resolution that we computed. We must update the
operation from user supplied
diff --git
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/MemoryGridCoverageResource.java
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/MemoryGridCoverageResource.java
index b71328c0a9..5f2af4ef15 100644
---
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/MemoryGridCoverageResource.java
+++
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/MemoryGridCoverageResource.java
@@ -256,7 +256,7 @@ public class MemoryGridCoverageResource extends
AbstractGridCoverageResource {
if (intersection.equals(source.getExtent())) {
return subset;
}
- var crs = source.isDefined(GridGeometry.CRS) ?
source.getCoordinateReferenceSystem() : null;
+ var crs = source.isDefined(GridGeometry.CRS) ?
source.getReferenceSystem() : null;
domain = new GridGeometry(intersection, PixelInCell.CELL_CORNER,
source.getGridToCRS(PixelInCell.CELL_CORNER), crs);
return new GridCoverageBuilder()
.setValues(data)
diff --git
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/aggregate/GridSlice.java
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/aggregate/GridSlice.java
index 0eafd52f1a..b4e670a938 100644
---
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/aggregate/GridSlice.java
+++
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/aggregate/GridSlice.java
@@ -115,7 +115,7 @@ final class GridSlice implements Comparable<GridSlice> {
@SuppressWarnings("LocalVariableHidesMemberVariable")
long[] offset;
GroupByTransform slices;
- final var crs = geometry.isDefined(GridGeometry.CRS) ?
geometry.getCoordinateReferenceSystem() : null;
+ final var crs = geometry.isDefined(GridGeometry.CRS) ?
geometry.getReferenceSystem() : null;
final GroupByCRS<GroupByTransform> crsGroup = bySample.getOrAdd(crs);
final List<GroupByTransform> transforms = crsGroup.members;
search: synchronized (transforms) {
diff --git
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/aggregate/GridSliceLocator.java
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/aggregate/GridSliceLocator.java
index 6333116a62..70e62fbf62 100644
---
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/aggregate/GridSliceLocator.java
+++
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/aggregate/GridSliceLocator.java
@@ -112,7 +112,7 @@ final class GridSliceLocator {
}
}
if (!aoi.equals(aoi = aoi.reshape(low, high, true))) {
- var crs = domain.isDefined(GridGeometry.CRS) ?
domain.getCoordinateReferenceSystem() : null;
+ var crs = domain.isDefined(GridGeometry.CRS) ?
domain.getReferenceSystem() : null;
domain = new GridGeometry(aoi, GridSlice.CELL_ANCHOR,
domain.getGridToCRS(GridSlice.CELL_ANCHOR), crs);
}
gridGeometry = domain;
diff --git
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/esri/AsciiGridStore.java
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/esri/AsciiGridStore.java
index 0898659f4e..c862ee0b75 100644
---
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/esri/AsciiGridStore.java
+++
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/esri/AsciiGridStore.java
@@ -489,7 +489,7 @@ cellsize: if (value != null) {
final Number setCoverage(final GridCoverage replacement, final
RenderedImage data, final int band) {
coverage = replacement;
gridGeometry = replacement.getGridGeometry();
- crs = gridGeometry.isDefined(GridGeometry.CRS) ?
gridGeometry.getCoordinateReferenceSystem() : null;
+ crs = gridGeometry.isDefined(GridGeometry.CRS) ?
gridGeometry.getReferenceSystem() : null;
width = data.getWidth();
height = data.getHeight();
metadata = null;
diff --git
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/image/WorldFileStore.java
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/image/WorldFileStore.java
index a69a08dc7a..bec499c35d 100644
---
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/image/WorldFileStore.java
+++
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/image/WorldFileStore.java
@@ -509,7 +509,7 @@ loop: for (int convention=0;; convention++) {
final int w =
Math.toIntExact(extent.getSize(WorldFileResource.X_DIMENSION));
final int h =
Math.toIntExact(extent.getSize(WorldFileResource.Y_DIMENSION));
final String s = (suffixWLD != null) ? suffixWLD :
getWorldFileSuffix();
- crs = gg.isDefined(GridGeometry.CRS) ?
gg.getCoordinateReferenceSystem() : null;
+ crs = gg.isDefined(GridGeometry.CRS) ? gg.getReferenceSystem() : null;
gridGeometry = gg; // Set only after success of all
the above.
width = w;
height = h;
diff --git
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/metadata/MetadataBuilder.java
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/metadata/MetadataBuilder.java
index 181b3bc32d..552999a621 100644
---
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/metadata/MetadataBuilder.java
+++
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/metadata/MetadataBuilder.java
@@ -1968,7 +1968,7 @@ public class MetadataBuilder {
setGeoreferencingAvailability(grid.isDefined(GridGeometry.GRID_TO_CRS), false,
false);
CoordinateSystem cs = null;
if (grid.isDefined(GridGeometry.CRS)) {
- final CoordinateReferenceSystem crs =
grid.getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem crs =
grid.getReferenceSystem();
cs = crs.getCoordinateSystem();
addReferenceSystem(crs);
}
diff --git
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/tiling/ImagePyramid.java
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/tiling/ImagePyramid.java
index 4d416203a0..1f8b4c4b57 100644
---
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/tiling/ImagePyramid.java
+++
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/tiling/ImagePyramid.java
@@ -300,7 +300,7 @@ final class ImagePyramid extends AbstractMap<GenericName,
ImageTileMatrix>
synchronized (matrices) {
tm = getOrCreateLevel(0); // Really 0, not `lowerMatrixIndex`.
}
- return tm.getTilingScheme().getCoordinateReferenceSystem();
+ return tm.getTilingScheme().getReferenceSystem();
}
/**
diff --git
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/tiling/TileMatrix.java
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/tiling/TileMatrix.java
index 608db8e50b..c41aaa9b88 100644
---
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/tiling/TileMatrix.java
+++
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/tiling/TileMatrix.java
@@ -107,7 +107,7 @@ public interface TileMatrix {
mb.addExtent(gg.getEnvelope(), null);
}
if (gg.isDefined(GridGeometry.CRS)) {
- CoordinateReferenceSystem crs =
gg.getCoordinateReferenceSystem();
+ CoordinateReferenceSystem crs = gg.getReferenceSystem();
mb.addReferenceSystem(crs);
mb.addSpatioTemporalResolution(getResolution(),
crs.getCoordinateSystem());
// Do not add `gg.getResolution()` because this is not the
pixel resolution.
diff --git
a/endorsed/src/org.apache.sis.storage/test/org/apache/sis/storage/CoverageSubsetTest.java
b/endorsed/src/org.apache.sis.storage/test/org/apache/sis/storage/CoverageSubsetTest.java
index 20f8c80d7b..b206243d3d 100644
---
a/endorsed/src/org.apache.sis.storage/test/org/apache/sis/storage/CoverageSubsetTest.java
+++
b/endorsed/src/org.apache.sis.storage/test/org/apache/sis/storage/CoverageSubsetTest.java
@@ -114,7 +114,7 @@ public final class CoverageSubsetTest extends TestCase {
{
final GridGeometry domain = reduced.getGridGeometry();
assertEquals(dimension, domain.getDimension());
- assertEquivalent(crs, domain.getCoordinateReferenceSystem());
+ assertEquivalent(crs, domain.getReferenceSystem());
final GridCoverage loaded = reduced.read(null);
assertEquals(domain, loaded.getGridGeometry());
diff --git
a/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/Scene2D.java
b/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/Scene2D.java
index d624998011..562539b199 100644
---
a/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/Scene2D.java
+++
b/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/Scene2D.java
@@ -113,7 +113,7 @@ public final class Scene2D {
* @throws RenderingException if the transform cannot be computed.
*/
public MathTransform getDataToDisplay(CoordinateReferenceSystem dataCrs)
throws RenderingException {
- final CoordinateReferenceSystem gridCrs =
grid.getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem gridCrs = grid.getReferenceSystem();
if (dataCrs == null) {
dataCrs = gridCrs;
}
diff --git
a/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/common/CoverageSlices.java
b/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/common/CoverageSlices.java
index c1e16b6170..8f6b0fbb0b 100644
---
a/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/common/CoverageSlices.java
+++
b/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/common/CoverageSlices.java
@@ -159,7 +159,7 @@ public final class CoverageSlices {
return true;
}
if (grid.isDefined(GridGeometry.CRS)) {
- final CoordinateReferenceSystem crs =
grid.getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem crs = grid.getReferenceSystem();
if (crs.getCoordinateSystem().getDimension() ==
grid.getDimension()) {
final CoordinateSystemAxis axis =
crs.getCoordinateSystem().getAxis(dimension);
return name.equalsIgnoreCase(axis.getName().getCode()) ||
name.equalsIgnoreCase(axis.getAbbreviation());
diff --git
a/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/common/GroundSpacing.java
b/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/common/GroundSpacing.java
index c0dc5114ec..e5a480a943 100644
---
a/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/common/GroundSpacing.java
+++
b/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/common/GroundSpacing.java
@@ -69,7 +69,7 @@ final class GroundSpacing {
columns = new double[height];
rows = new double[height];
try {
- final CoordinateReferenceSystem crs =
grid.getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem crs = grid.getReferenceSystem();
final MathTransform gridToCRS =
grid.getGridToCRS(PixelInCell.CELL_CENTER);
final Unit<?> unit =
crs.getCoordinateSystem().getAxis(0).getUnit();
final GeodeticCalculator calculator = Units.isLinear(unit) ? null
: GeodeticCalculator.create(crs);
diff --git
a/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/common/MapScale.java
b/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/common/MapScale.java
index 10190e46f8..48f59b8665 100644
---
a/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/common/MapScale.java
+++
b/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/common/MapScale.java
@@ -96,7 +96,7 @@ public final class MapScale {
* @throws RenderingException if the size cannot be computed.
*/
public double metresPerPixel() throws RenderingException {
- final CoordinateReferenceSystem crs =
grid.getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem crs = grid.getReferenceSystem();
try {
final MathTransform gridToCRS =
grid.getGridToCRS(PixelInCell.CELL_CENTER);
final double[] p0 =
grid.getExtent().getPointOfInterest(PixelInCell.CELL_CENTER);
diff --git
a/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/se1/RasterToScene2D.java
b/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/se1/RasterToScene2D.java
index 7ad7b54b21..a17f69ca83 100644
---
a/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/se1/RasterToScene2D.java
+++
b/incubator/src/org.apache.sis.portrayal.map/main/org/apache/sis/map/service/se1/RasterToScene2D.java
@@ -752,7 +752,7 @@ public final class RasterToScene2D extends
SymbolizerToScene2D<RasterSymbolizer<
final MathTransform gridToCRS =
gg.getGridToCRS(PixelInCell.CELL_CORNER);
final double[] crs = new double[grid.length];
gridToCRS.transform(grid, 0, crs, 0, grid.length / 2);
- final CoordinateReferenceSystem crs2D =
gg.getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem crs2D = gg.getReferenceSystem();
return GeometryFactory.DEFAULT.createPolygon(
GeometryFactory.DEFAULT.createLinearRing(GeometryFactory.DEFAULT.createDataPoints(crs2D,
crs)), List.of());
} catch (TransformException | RuntimeException ex) {
diff --git
a/incubator/src/org.apache.sis.portrayal.map/test/org/apache/sis/map/service/GraphicsPortrayerTest.java
b/incubator/src/org.apache.sis.portrayal.map/test/org/apache/sis/map/service/GraphicsPortrayerTest.java
index 711db8eb5b..6692678d02 100644
---
a/incubator/src/org.apache.sis.portrayal.map/test/org/apache/sis/map/service/GraphicsPortrayerTest.java
+++
b/incubator/src/org.apache.sis.portrayal.map/test/org/apache/sis/map/service/GraphicsPortrayerTest.java
@@ -88,7 +88,7 @@ public class GraphicsPortrayerTest {
final Feature feature = ft.newInstance();
LineString geom = GF.createLineString(new Coordinate[]{new
Coordinate(0,0), new Coordinate(0,90)});
- geom.setUserData(WORLD.getCoordinateReferenceSystem());
+ geom.setUserData(WORLD.getReferenceSystem());
feature.setPropertyValue("geom", geom);
final FeatureSet featureSet = new MemoryFeatureSet(null, ft,
Arrays.asList(feature));
@@ -125,7 +125,7 @@ public class GraphicsPortrayerTest {
final Feature feature = ft.newInstance();
LineString geom = GF.createLineString(new Coordinate[]{new
Coordinate(0,0), new Coordinate(0,90)});
- geom.setUserData(WORLD.getCoordinateReferenceSystem());
+ geom.setUserData(WORLD.getReferenceSystem());
feature.setPropertyValue(AttributeConvention.IDENTIFIER, "test-1");
feature.setPropertyValue("geom", geom);
@@ -165,7 +165,7 @@ public class GraphicsPortrayerTest {
final Feature feature = ft.newInstance();
LineString geom = GF.createLineString(new Coordinate[]{new
Coordinate(0,0), new Coordinate(0,90)});
- geom.setUserData(WORLD.getCoordinateReferenceSystem());
+ geom.setUserData(WORLD.getReferenceSystem());
feature.setPropertyValue("geom", geom);
final FeatureSet featureSet = new MemoryFeatureSet(null, ft,
Arrays.asList(feature));
diff --git
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/coverage/BandedCoverageResource.java
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/coverage/BandedCoverageResource.java
index eb161d26a9..6b48a8c9aa 100644
---
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/coverage/BandedCoverageResource.java
+++
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/coverage/BandedCoverageResource.java
@@ -185,7 +185,7 @@ public interface BandedCoverageResource extends DataSet {
//convert to resulting coverage crs
final double[] xyResult;
final CoordinateReferenceSystem crs2d =
CRS.getHorizontalComponent(resource.getEnvelope().get().getCoordinateReferenceSystem());
- final CoordinateReferenceSystem gridCrs2d =
CRS.getHorizontalComponent(domain.getCoordinateReferenceSystem());
+ final CoordinateReferenceSystem gridCrs2d =
CRS.getHorizontalComponent(domain.getReferenceSystem());
if (!CRS.equivalent(gridCrs2d, crs2d)) {
MathTransform trs = CRS.findOperation(gridCrs2d, crs2d,
null).getMathTransform();
trs = MathTransforms.concatenate(gridToCRS, trs);
diff --git
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/coverage/CoverageUtilities.java
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/coverage/CoverageUtilities.java
index f0a1a4921d..f7c6cb1034 100644
---
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/coverage/CoverageUtilities.java
+++
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/coverage/CoverageUtilities.java
@@ -45,7 +45,7 @@ public final class CoverageUtilities {
final GridExtent extent = gg.getExtent();
if (!extent.startsAtZero()) {
CoordinateReferenceSystem crs = null;
- if (gg.isDefined(GridGeometry.CRS)) crs =
gg.getCoordinateReferenceSystem();
+ if (gg.isDefined(GridGeometry.CRS)) crs =
gg.getReferenceSystem();
final int dimension = extent.getDimension();
final double[] vector = new double[dimension];
final long[] high = new long[dimension];
diff --git
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/dggs/DiscreteGlobalGridCoverageProcessor.java
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/dggs/DiscreteGlobalGridCoverageProcessor.java
index fb0265cb45..4f8e52dfc6 100644
---
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/dggs/DiscreteGlobalGridCoverageProcessor.java
+++
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/dggs/DiscreteGlobalGridCoverageProcessor.java
@@ -547,7 +547,7 @@ public final class DiscreteGlobalGridCoverageProcessor {
try (final WritableCodeIterator iterator =
target.createWritableIterator()) {
final GridGeometry sourceGrid = source.getGridGeometry();
- final CoordinateSystem cs =
sourceGrid.getCoordinateReferenceSystem().getCoordinateSystem();
+ final CoordinateSystem cs =
sourceGrid.getReferenceSystem().getCoordinateSystem();
int cellDimensionId = -1;
for (int dimIdx = 0; dimIdx < cs.getDimension(); dimIdx++) {
diff --git
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/dggs/internal/shared/AbstractDiscreteGlobalGridCoverage.java
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/dggs/internal/shared/AbstractDiscreteGlobalGridCoverage.java
index b3b42497a0..a3c58ae145 100644
---
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/dggs/internal/shared/AbstractDiscreteGlobalGridCoverage.java
+++
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/dggs/internal/shared/AbstractDiscreteGlobalGridCoverage.java
@@ -117,7 +117,7 @@ public abstract class AbstractDiscreteGlobalGridCoverage
extends CodedCoverage{
//convert to crs
final double[] xyTin;
final CoordinateReferenceSystem crs2d =
CRS.getHorizontalComponent(getCoordinateReferenceSystem());
- final CoordinateReferenceSystem gridCrs2d =
CRS.getHorizontalComponent(tileArea.getCoordinateReferenceSystem());
+ final CoordinateReferenceSystem gridCrs2d =
CRS.getHorizontalComponent(tileArea.getReferenceSystem());
if (!Utilities.equalsIgnoreMetadata(gridCrs2d, crs2d)) {
MathTransform trs = CRS.findOperation(gridCrs2d, crs2d,
null).getMathTransform();
trs = MathTransforms.concatenate(gridToCRS, trs);
diff --git
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/dggs/internal/shared/GridAsDiscreteGlobalGridResource.java
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/dggs/internal/shared/GridAsDiscreteGlobalGridResource.java
index 1d760da99a..a824ece192 100644
---
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/dggs/internal/shared/GridAsDiscreteGlobalGridResource.java
+++
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/dggs/internal/shared/GridAsDiscreteGlobalGridResource.java
@@ -122,7 +122,7 @@ public final class GridAsDiscreteGlobalGridResource extends
AbstractResource imp
* compute average resolution of a grid geometry
*/
public static Quantity<?> computeAverageResolution(GridGeometry domain)
throws TransformException {
- final SingleCRS horizontalCrs =
CRS.getHorizontalComponent(domain.getCoordinateReferenceSystem());
+ final SingleCRS horizontalCrs =
CRS.getHorizontalComponent(domain.getReferenceSystem());
//todo we should slice the domain to horizontal crs to be sure we have
the resolution at index 0
//we use 1/100 of the resolution as distance to avoid problems with
pole to pole coverages with very low resolution
final double resScale = 100;
diff --git
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/dggs/internal/shared/IndexedDiscreteGlobalGridCoverage.java
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/dggs/internal/shared/IndexedDiscreteGlobalGridCoverage.java
index f753112e21..a8db2da3f3 100644
---
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/dggs/internal/shared/IndexedDiscreteGlobalGridCoverage.java
+++
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/dggs/internal/shared/IndexedDiscreteGlobalGridCoverage.java
@@ -124,7 +124,7 @@ public abstract class IndexedDiscreteGlobalGridCoverage
extends AbstractDiscrete
final Rectangle imgRect = new Rectangle(width, height);
final Area bbox = new Area(imgRect);
- final MathTransform zoneToCrs =
CRS.findOperation(dggrs.getGridSystem().getCoordinateReferenceSystem(),
tileArea.getCoordinateReferenceSystem(), null).getMathTransform();
+ final MathTransform zoneToCrs =
CRS.findOperation(dggrs.getGridSystem().getCoordinateReferenceSystem(),
tileArea.getReferenceSystem(), null).getMathTransform();
final MathTransform zoneToGrid =
MathTransforms.concatenate(zoneToCrs, gridToCRS.inverse());
//prepare the coverage
diff --git
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/CodedCoverages.java
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/CodedCoverages.java
index 103941498b..c3e87a556d 100644
---
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/CodedCoverages.java
+++
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/CodedCoverages.java
@@ -43,7 +43,7 @@ public final class CodedCoverages {
* View given grid coverage as a DiscreteGlobalGridResource.
*/
public static CodedResource viewAsDggrs(GenericName name,
GridCoverageResource base, DiscreteGlobalGridReferenceSystem dggrs) throws
DataStoreException, IncommensurableException, TransformException,
FactoryException {
- final CoordinateReferenceSystem baseCrs =
base.getGridGeometry().getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem baseCrs =
base.getGridGeometry().getReferenceSystem();
if (CRS.isHorizontalCRS(baseCrs)) {
//use a more efficient implementation
return new GridAsDiscreteGlobalGridResource(dggrs, base);
diff --git
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/CodedGeometry.java
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/CodedGeometry.java
index 1cb85fab52..53bda08099 100644
---
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/CodedGeometry.java
+++
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/CodedGeometry.java
@@ -82,7 +82,7 @@ public class CodedGeometry {
private final CodeTransform gridToRS;
public CodedGeometry(GridGeometry grid) {
- this(grid.isDefined(GridGeometry.CRS) ?
grid.getCoordinateReferenceSystem() : null,
+ this(grid.isDefined(GridGeometry.CRS) ? grid.getReferenceSystem() :
null,
grid.isDefined(GridGeometry.EXTENT) ? grid.getExtent() : null,
grid.isDefined(GridGeometry.GRID_TO_CRS) ?
CodeTransforms.toTransform(grid) : null,
null);
diff --git
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/CodedResource.java
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/CodedResource.java
index 697e38af3f..ab0db961bf 100644
---
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/CodedResource.java
+++
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/CodedResource.java
@@ -77,7 +77,7 @@ public interface CodedResource extends BandedCoverageResource
{
//cut domain in single crs grid geometries
- final CoordinateReferenceSystem queryCrs =
domain.getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem queryCrs = domain.getReferenceSystem();
final List<SingleCRS> queryCrss = CRS.getSingleComponents(queryCrs);
final List<CodedGeometry> domainSlices = new ArrayList<>();
for (SingleCRS scrs : queryCrss) {
diff --git
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/internal/shared/AbstractCodedCoverage.java
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/internal/shared/AbstractCodedCoverage.java
index 37f3e16bb4..2bc789a52f 100644
---
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/internal/shared/AbstractCodedCoverage.java
+++
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/internal/shared/AbstractCodedCoverage.java
@@ -196,7 +196,7 @@ public abstract class AbstractCodedCoverage extends
CodedCoverage{
//convert to crs
final double[] xyTin;
final CoordinateReferenceSystem crs2d =
CRS.getHorizontalComponent(getCoordinateReferenceSystem());
- final CoordinateReferenceSystem gridCrs2d =
CRS.getHorizontalComponent(tileArea.getCoordinateReferenceSystem());
+ final CoordinateReferenceSystem gridCrs2d =
CRS.getHorizontalComponent(tileArea.getReferenceSystem());
if (!CRS.equivalent(gridCrs2d, crs2d)) {
MathTransform trs = CRS.findOperation(gridCrs2d, crs2d,
null).getMathTransform();
trs = MathTransforms.concatenate(gridToCRS, trs);
diff --git
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/internal/shared/CodeTransforms.java
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/internal/shared/CodeTransforms.java
index 580bf79526..0ddb7a6379 100644
---
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/internal/shared/CodeTransforms.java
+++
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/internal/shared/CodeTransforms.java
@@ -78,7 +78,7 @@ public final class CodeTransforms {
* @throws FactoryException
*/
public static GridGeometry slice(GridGeometry base,
CoordinateReferenceSystem crs) throws FactoryException {
- final List<SingleCRS> singles = (List)
ReferenceSystems.getSingleComponents(base.getCoordinateReferenceSystem(), true);
+ final List<SingleCRS> singles = (List)
ReferenceSystems.getSingleComponents(base.getReferenceSystem(), true);
int idx = 0;
for (SingleCRS s : singles) {
if (s == crs) {
@@ -186,7 +186,7 @@ public final class CodeTransforms {
@Override
public ReferenceSystem getReferenceSystem() {
- return grid.isDefined(GridGeometry.CRS) ?
grid.getCoordinateReferenceSystem() : null;
+ return grid.isDefined(GridGeometry.CRS) ?
grid.getReferenceSystem() : null;
}
@Override
@@ -243,7 +243,7 @@ public final class CodeTransforms {
int idx = 0;
int crsSize = 0;
- final List<ReferenceSystem> singleComponents =
ReferenceSystems.getSingleComponents(grid.getCoordinateReferenceSystem(), true);
+ final List<ReferenceSystem> singleComponents =
ReferenceSystems.getSingleComponents(grid.getReferenceSystem(), true);
final List<CoordinateReferenceSystem> toAgg = new ArrayList<>();
for (ReferenceSystem rs : singleComponents) {
CoordinateReferenceSystem crs = (CoordinateReferenceSystem) rs;
diff --git
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/internal/shared/CompoundCodedResource.java
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/internal/shared/CompoundCodedResource.java
index 3eeff9b7ae..9764025673 100644
---
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/internal/shared/CompoundCodedResource.java
+++
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/internal/shared/CompoundCodedResource.java
@@ -263,7 +263,7 @@ public final class CompoundCodedResource extends
AbstractResource implements Cod
private static CodedGeometry mergeGrids(CodedGeometry cg1, CodedGeometry
cg2) throws FactoryException, TransformException {
final GridGeometry grid1 = cg1.isRegularGrid().get();
GridGeometry grid2 = cg2.isRegularGrid().get();
- final CoordinateReferenceSystem crs1 =
grid1.getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem crs1 = grid1.getReferenceSystem();
if ( grid1.isDefined(GridGeometry.EXTENT | GridGeometry.GRID_TO_CRS)
&& grid2.isDefined(GridGeometry.EXTENT | GridGeometry.GRID_TO_CRS))
{
@@ -289,7 +289,7 @@ public final class CompoundCodedResource extends
AbstractResource implements Cod
}
private static GridGeometry toOther(GridGeometry grid,
CoordinateReferenceSystem target) throws FactoryException {
- final CoordinateReferenceSystem source =
grid.getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem source = grid.getReferenceSystem();
final GridExtent sourceExtent = grid.getExtent();
final MathTransform sourceGridToCRS =
grid.getGridToCRS(PixelInCell.CELL_CENTER);
final MathTransform trs = CRS.findOperation(source, target,
null).getMathTransform();
diff --git
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/internal/shared/GridAsCodedResource.java
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/internal/shared/GridAsCodedResource.java
index 48a1539a10..717a4d5b52 100644
---
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/internal/shared/GridAsCodedResource.java
+++
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/internal/shared/GridAsCodedResource.java
@@ -82,7 +82,7 @@ public final class GridAsCodedResource extends
AbstractResource implements Coded
//create matching reference grid geometry replacing the horizontal crs
final GridGeometry sourceGridGeometry = resource.getGridGeometry();
- final List<SingleCRS> singles = (List)
ReferenceSystems.getSingleComponents(sourceGridGeometry.getCoordinateReferenceSystem(),
true);
+ final List<SingleCRS> singles = (List)
ReferenceSystems.getSingleComponents(sourceGridGeometry.getReferenceSystem(),
true);
final List<CodedGeometry> parts = new ArrayList<>();
for (int i = 0, n = singles.size(); i < n ; i++) {
@@ -249,7 +249,7 @@ public final class GridAsCodedResource extends
AbstractResource implements Coded
private static CodedGeometry expend(CodedGeometry base, GridGeometry
toAppend) throws FactoryException {
final Set<ReferenceSystem> all = new LinkedHashSet();
-
all.addAll(ReferenceSystems.getSingleComponents(toAppend.getCoordinateReferenceSystem(),
true));
+
all.addAll(ReferenceSystems.getSingleComponents(toAppend.getReferenceSystem(),
true));
final List<CodedGeometry> parts = new ArrayList<>();
for (ReferenceSystem rs : all) {
@@ -279,13 +279,13 @@ public final class GridAsCodedResource extends
AbstractResource implements Coded
private static GridGeometry smartIntersect(GridGeometry base, GridGeometry
query) throws FactoryException {
- final List<ReferenceSystem> queryCrs =
ReferenceSystems.getSingleComponents(query.getCoordinateReferenceSystem(),
true);
+ final List<ReferenceSystem> queryCrs =
ReferenceSystems.getSingleComponents(query.getReferenceSystem(), true);
final CodedGeometry basergg = new CodedGeometry(base);
final CodedGeometry queryrgg = new CodedGeometry(query);
GridGeometry result = null;
- for (ReferenceSystem rs :
ReferenceSystems.getSingleComponents(base.getCoordinateReferenceSystem(),
true)) {
+ for (ReferenceSystem rs :
ReferenceSystems.getSingleComponents(base.getReferenceSystem(), true)) {
final CoordinateReferenceSystem baseSliceCrs =
(CoordinateReferenceSystem) rs;
GridGeometry slice =
basergg.slice(baseSliceCrs).get().isRegularGrid().get();
diff --git
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/internal/shared/ReducedCodedResource.java
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/internal/shared/ReducedCodedResource.java
index 06e01a36e2..ff9a46b2c9 100644
---
a/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/internal/shared/ReducedCodedResource.java
+++
b/incubator/src/org.apache.sis.referencing.dggs/main/org/apache/sis/storage/rs/internal/shared/ReducedCodedResource.java
@@ -111,7 +111,7 @@ public final class ReducedCodedResource extends
AbstractResource implements Code
if (gridToRS instanceof CodeTransforms.Grid g) {
final GridGeometry grid = g.getGrid();
gridToRS = CodeTransforms.toTransform(new GridGeometry(cell,
PixelInCell.CELL_CENTER,
- grid.getGridToCRS(PixelInCell.CELL_CENTER),
grid.getCoordinateReferenceSystem()));
+ grid.getGridToCRS(PixelInCell.CELL_CENTER),
grid.getReferenceSystem()));
}
hiddenSlices[idx] = new CodedGeometry(component, cell, gridToRS,
null);
}
diff --git
a/incubator/src/org.apache.sis.storage.json/main/org/apache/sis/storage/coveragejson/CoverageResource.java
b/incubator/src/org.apache.sis.storage.json/main/org/apache/sis/storage/coveragejson/CoverageResource.java
index e24323c1e2..03920dc87b 100644
---
a/incubator/src/org.apache.sis.storage.json/main/org/apache/sis/storage/coveragejson/CoverageResource.java
+++
b/incubator/src/org.apache.sis.storage.json/main/org/apache/sis/storage/coveragejson/CoverageResource.java
@@ -536,7 +536,7 @@ final class CoverageResource extends
AbstractGridCoverageResource {
throw new DataStoreException("Coveragejson only support linear
grid to CRS transform without rotation or shearing");
}
- final CoordinateReferenceSystem crs =
gridGeometry.getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem crs =
gridGeometry.getReferenceSystem();
int crsIdx = 0;
for (CoordinateReferenceSystem scrs : CRS.getSingleComponents(crs)) {
final int gridIdx = gridToCrsIndex.get(crsIdx);
diff --git
a/incubator/src/org.apache.sis.storage.json/test/org/apache/sis/storage/coveragejson/CoverageJsonStoreTest.java
b/incubator/src/org.apache.sis.storage.json/test/org/apache/sis/storage/coveragejson/CoverageJsonStoreTest.java
index 649bd8cbad..9e302f8958 100644
---
a/incubator/src/org.apache.sis.storage.json/test/org/apache/sis/storage/coveragejson/CoverageJsonStoreTest.java
+++
b/incubator/src/org.apache.sis.storage.json/test/org/apache/sis/storage/coveragejson/CoverageJsonStoreTest.java
@@ -81,7 +81,7 @@ public class CoverageJsonStoreTest {
DimensionNameType.valueOf("t")},
new long[]{0,0,0,0}, new long[]{2,1,0,0}, true);
assertEquals(expectedExtent, result.getExtent());
- assertEquals(CRS.compound(CommonCRS.WGS84.geographic3D(),
CommonCRS.Temporal.JAVA.crs()), result.getCoordinateReferenceSystem());
+ assertEquals(CRS.compound(CommonCRS.WGS84.geographic3D(),
CommonCRS.Temporal.JAVA.crs()), result.getReferenceSystem());
//TODO test transform
}
diff --git
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/coverage/GridSliceSelector.java
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/coverage/GridSliceSelector.java
index c3b9cf4304..de00936147 100644
---
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/coverage/GridSliceSelector.java
+++
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/coverage/GridSliceSelector.java
@@ -359,7 +359,7 @@ public class GridSliceSelector extends Widget {
gridToCRS = (MathTransform1D) ts.separate();
final int targetDim = ts.getTargetDimensions()[0]; //
Must be after call to `separate(…)`.
if (gg.isDefined(GridGeometry.CRS)) {
- final CoordinateReferenceSystem crs =
gg.getCoordinateReferenceSystem();
+ final CoordinateReferenceSystem crs =
gg.getReferenceSystem();
final CoordinateReferenceSystem c =
CRS.getComponentAt(crs, targetDim, targetDim+1);
timeCRS = (c instanceof TemporalCRS) ?
DefaultTemporalCRS.castOrCopy((TemporalCRS) c) : null;
axis = crs.getCoordinateSystem().getAxis(targetDim);
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 ec639961e0..1ef0700b76 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
@@ -404,7 +404,7 @@ public abstract class MapCanvas extends PlanarCanvas {
/**
* Sets the objective bounds and/or the zoom level and objective CRS to
use for the initial view of data.
- * The {@code visibleArea} {@linkplain
GridGeometry#getCoordinateReferenceSystem() CRS} defines the initial
+ * The {@code visibleArea} {@linkplain GridGeometry#getReferenceSystem()
CRS} defines the initial
* {@linkplain #setObjectiveCRS(CoordinateReferenceSystem, DirectPosition)
objective CRS} of this canvas.
* The {@code visibleArea} {@linkplain GridGeometry#getEnvelope()
envelope} defines the (usually constant)
* {@linkplain #setObjectiveBounds(Envelope) objective bounds} of this
canvas.
@@ -1437,7 +1437,7 @@ public abstract class MapCanvas extends PlanarCanvas {
}
if (objectiveCRS == null) {
if (init != null && init.isDefined(GridGeometry.CRS)) {
- objectiveCRS = init.getCoordinateReferenceSystem();
+ objectiveCRS = init.getReferenceSystem();
} else {
Optional<Identifier> id = getContentIdentifier();
if (id.isPresent()) {
diff --git
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/OperationFinder.java
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/OperationFinder.java
index 2e3b945892..a576ed739f 100644
---
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/OperationFinder.java
+++
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/OperationFinder.java
@@ -134,11 +134,11 @@ abstract class OperationFinder extends
Task<MathTransform> {
if (dataGeometry != null && dataGeometry.isDefined(GridGeometry.CRS |
GridGeometry.GRID_TO_CRS)) {
if (sourceIsGrid = isGridCRS(source)) {
before = dataGeometry.getGridToCRS(PixelInCell.CELL_CENTER);
- source = dataGeometry.getCoordinateReferenceSystem();
+ source = dataGeometry.getReferenceSystem();
}
if (targetIsGrid = isGridCRS(target)) {
after =
dataGeometry.getGridToCRS(PixelInCell.CELL_CENTER).inverse();
- target = dataGeometry.getCoordinateReferenceSystem();
+ target = dataGeometry.getReferenceSystem();
}
}
operation = CRS.findOperation(source, target, bbox);
@@ -161,7 +161,7 @@ abstract class OperationFinder extends Task<MathTransform> {
if (isGridCRS(crs)) {
final GridGeometry dataGeometry = dataGeometry(canvas);
if (dataGeometry != null &&
dataGeometry.isDefined(GridGeometry.CRS)) {
- crs = dataGeometry.getCoordinateReferenceSystem();
+ crs = dataGeometry.getReferenceSystem();
}
}
return crs;
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 23526ff0ab..da69fcb768 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
@@ -711,7 +711,7 @@ public class StatusBar extends Widget implements
EventHandler<MouseEvent> {
* by the specified grid geometry. The geometry properties are applied as
below:
*
* <ul>
- * <li>{@link GridGeometry#getCoordinateReferenceSystem()} defines the
CRS of the coordinates to format.</li>
+ * <li>{@link GridGeometry#getReferenceSystem()} defines the CRS of the
coordinates to format.</li>
* <li>{@link GridGeometry#getGridToCRS(PixelInCell)
GridGeometry.getGridToCRS(PixelInCell.CELL_CENTER)}
* defines the conversion from coordinate values local to the canvas
to coordinate values in the CRS
* (the {@linkplain #localToObjectiveCRS local to objective CRS}
conversion).</li>
@@ -797,7 +797,7 @@ public class StatusBar extends Widget implements
EventHandler<MouseEvent> {
Unit<?> unit = Units.PIXEL;
if (geometry != null) {
if (geometry.isDefined(GridGeometry.CRS)) {
- crs = geometry.getCoordinateReferenceSystem();
+ crs = geometry.getReferenceSystem();
}
if (geometry.isDefined(GridGeometry.GRID_TO_CRS)) {
localToCRS = geometry.getGridToCRS(PixelInCell.CELL_CENTER);
diff --git
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/referencing/RecentReferenceSystems.java
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/referencing/RecentReferenceSystems.java
index 1b3140a863..030a4bbd6d 100644
---
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/referencing/RecentReferenceSystems.java
+++
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/referencing/RecentReferenceSystems.java
@@ -346,7 +346,7 @@ public class RecentReferenceSystems {
if (gg.isDefined(GridGeometry.ENVELOPE)) {
envelopes[countCRS] = gg.getEnvelope();
}
- refsys[countCRS++] = gg.getCoordinateReferenceSystem();
+ refsys[countCRS++] = gg.getReferenceSystem();
}
final GridExtent extent = gg.getExtent();
gg =
gg.selectDimensions(extent.getSubspaceDimensions(Math.max(extent.getDegreesOfFreedom(),
BIDIMENSIONAL)));