This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git
The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
new 1182c4c724 Change in the type of ProjectedCRS.baseCRS: relaxed from
GeographicCRS to GeodeticCRS for conformance to ISO 19111.
1182c4c724 is described below
commit 1182c4c724c953cc122cf9fa00d20a046bd9deb6
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Wed Apr 17 18:53:37 2024 +0200
Change in the type of ProjectedCRS.baseCRS:
relaxed from GeographicCRS to GeodeticCRS for conformance to ISO 19111.
---
.../org/apache/sis/buildtools/book/OGC.lst | 1 -
.../org/apache/sis/portrayal/CanvasContext.java | 4 +-
.../gazetteer/MilitaryGridReferenceSystem.java | 4 +-
.../apache/sis/io/wkt/GeodeticObjectParser.java | 4 +-
.../main/org/apache/sis/referencing/CRS.java | 4 +-
.../referencing/EllipsoidalHeightSeparator.java | 5 +--
.../sis/referencing/crs/DefaultProjectedCRS.java | 44 ++++++++++++----------
.../{SC_GeographicCRS.java => SC_GeodeticCRS.java} | 37 +++++++++---------
.../apache/sis/referencing/crs/package-info.java | 2 +-
.../factory/CommonAuthorityFactory.java | 3 +-
.../referencing/factory/GeodeticObjectFactory.java | 2 +-
.../factory/MultiAuthoritiesFactory.java | 4 +-
.../referencing/factory/sql/EPSGDataAccess.java | 6 +--
.../referencing/operation/DefaultConversion.java | 7 ++--
.../DefaultCoordinateOperationFactory.java | 10 ++---
.../referencing/operation/DefaultProjection.java | 12 +++---
.../privy/EllipsoidalHeightCombiner.java | 4 +-
.../referencing/privy/GeodeticObjectBuilder.java | 3 +-
.../sis/xml/bind/referencing/SC_GeodeticCRS.md | 2 +
.../sis/xml/bind/referencing/SC_GeographicCRS.md | 4 --
.../org/apache/sis/geometry/TransformTestCase.java | 15 ++++----
.../sis/io/wkt/GeodeticObjectParserTest.java | 4 +-
.../referencing/crs/DefaultProjectedCRSTest.java | 4 +-
.../report/CoordinateReferenceSystems.java | 2 +-
.../integration/CoordinateReferenceSystemTest.java | 16 ++++----
.../sis/storage/geotiff/reader/CRSBuilder.java | 4 +-
geoapi/snapshot | 2 +-
27 files changed, 105 insertions(+), 104 deletions(-)
diff --git a/buildSrc/src/main/resources/org/apache/sis/buildtools/book/OGC.lst
b/buildSrc/src/main/resources/org/apache/sis/buildtools/book/OGC.lst
index 7cc85d7506..f9449cb40b 100644
--- a/buildSrc/src/main/resources/org/apache/sis/buildtools/book/OGC.lst
+++ b/buildSrc/src/main/resources/org/apache/sis/buildtools/book/OGC.lst
@@ -217,7 +217,6 @@ SC_EngineeringCRS
SC_GeneralDerivedCRS
SC_GeocentricCRS
SC_GeodeticCRS
-SC_GeographicCRS
SC_ImageCRS
SC_ProjectedCRS
SC_SingleCRS
diff --git
a/endorsed/src/org.apache.sis.portrayal/main/org/apache/sis/portrayal/CanvasContext.java
b/endorsed/src/org.apache.sis.portrayal/main/org/apache/sis/portrayal/CanvasContext.java
index 38477fde68..aae76518d5 100644
---
a/endorsed/src/org.apache.sis.portrayal/main/org/apache/sis/portrayal/CanvasContext.java
+++
b/endorsed/src/org.apache.sis.portrayal/main/org/apache/sis/portrayal/CanvasContext.java
@@ -19,7 +19,7 @@ package org.apache.sis.portrayal;
import java.util.Optional;
import java.util.OptionalDouble;
import org.opengis.metadata.extent.GeographicBoundingBox;
-import org.opengis.referencing.crs.GeographicCRS;
+import org.opengis.referencing.crs.GeodeticCRS;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.referencing.datum.Ellipsoid;
import org.opengis.referencing.operation.Matrix;
@@ -201,7 +201,7 @@ final class CanvasContext extends
CoordinateOperationContext {
}
combined[j] = m;
}
- final Ellipsoid ellipsoid = ((GeographicCRS)
objectiveToGeographic.getTargetCRS()).getDatum().getEllipsoid();
+ final Ellipsoid ellipsoid = ((GeodeticCRS)
objectiveToGeographic.getTargetCRS()).getDatum().getEllipsoid();
double radius = Formulas.radiusOfConformalSphere(ellipsoid,
combined[1]);
radius =
ellipsoid.getAxisUnit().getConverterTo(Units.METRE).convert(radius);
resolution = MathFunctions.magnitude(combined) * radius;
diff --git
a/endorsed/src/org.apache.sis.referencing.gazetteer/main/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java
b/endorsed/src/org.apache.sis.referencing.gazetteer/main/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java
index 7af3c082e8..50f61b01a4 100644
---
a/endorsed/src/org.apache.sis.referencing.gazetteer/main/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java
+++
b/endorsed/src/org.apache.sis.referencing.gazetteer/main/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java
@@ -43,7 +43,7 @@ import org.opengis.referencing.operation.MathTransform;
import org.opengis.referencing.operation.MathTransform2D;
import org.opengis.referencing.operation.OperationMethod;
import org.opengis.referencing.operation.CoordinateOperation;
-import org.opengis.referencing.operation.Projection;
+import org.opengis.referencing.operation.Conversion;
import org.opengis.referencing.operation.TransformException;
import org.apache.sis.referencing.CRS;
import org.apache.sis.referencing.CommonCRS;
@@ -1523,7 +1523,7 @@ public class MilitaryGridReferenceSystem extends
ReferencingByIdentifiers {
this.datum = datum;
if (horizontal instanceof ProjectedCRS) {
ProjectedCRS projCRS = (ProjectedCRS) horizontal;
- Projection projection = projCRS.getConversionFromBase();
+ Conversion projection = projCRS.getConversionFromBase();
final OperationMethod method = projection.getMethod();
if (IdentifiedObjects.isHeuristicMatchForName(method,
TransverseMercator.NAME)) {
crsZone = ZONER.zone(projection.getParameterValues());
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/GeodeticObjectParser.java
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/GeodeticObjectParser.java
index 4fb5f64603..f0678cf713 100644
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/GeodeticObjectParser.java
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/GeodeticObjectParser.java
@@ -2111,7 +2111,7 @@ class GeodeticObjectParser extends MathTransformParser
implements Comparator<Coo
final boolean isWKT1 = element.getKeywordIndex() == 2;
// Index of "ProjCS" above.
final String name = element.pullString("name");
final SingleCRS geoCRS = parseGeodeticCRS(MANDATORY, element, 2,
WKTKeywords.ellipsoidal);
- if (!(geoCRS instanceof GeographicCRS)) {
+ if (!(geoCRS instanceof GeodeticCRS)) {
throw new UnparsableObjectException(errorLocale,
Errors.Keys.IllegalCRSType_1,
new Object[] {geoCRS.getClass()}, element.offset);
}
@@ -2154,7 +2154,7 @@ class GeodeticObjectParser extends MathTransformParser
implements Comparator<Coo
final Map<String,?> properties = parseMetadataAndClose(element,
name, conversion);
if (cs instanceof CartesianCS) {
final CRSFactory crsFactory = factories.getCRSFactory();
- return crsFactory.createProjectedCRS(properties,
(GeographicCRS) geoCRS, conversion, (CartesianCS) cs);
+ return crsFactory.createProjectedCRS(properties, (GeodeticCRS)
geoCRS, conversion, (CartesianCS) cs);
}
} catch (FactoryException exception) {
throw element.parseFailed(exception);
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/CRS.java
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/CRS.java
index 5cc2248a7b..5e8ac70fa7 100644
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/CRS.java
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/CRS.java
@@ -1298,8 +1298,8 @@ public final class CRS extends Static {
* for letting SIS create or associate new ones, which will be
two-dimensional now.
*/
if (crs instanceof ProjectedCRS) {
- final ProjectedCRS proj = (ProjectedCRS) crs;
- final GeographicCRS base = (GeographicCRS)
getHorizontalComponent(proj.getBaseCRS());
+ final ProjectedCRS proj = (ProjectedCRS) crs;
+ final GeodeticCRS base = (GeodeticCRS)
getHorizontalComponent(proj.getBaseCRS());
Conversion fromBase = proj.getConversionFromBase();
fromBase = new
DefaultConversion(IdentifiedObjects.getProperties(fromBase),
fromBase.getMethod(), null,
fromBase.getParameterValues());
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/EllipsoidalHeightSeparator.java
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/EllipsoidalHeightSeparator.java
index 2db54434df..d03a744c4f 100644
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/EllipsoidalHeightSeparator.java
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/EllipsoidalHeightSeparator.java
@@ -27,7 +27,6 @@ import org.opengis.referencing.crs.SingleCRS;
import org.opengis.referencing.crs.VerticalCRS;
import org.opengis.referencing.crs.ProjectedCRS;
import org.opengis.referencing.crs.GeodeticCRS;
-import org.opengis.referencing.crs.GeographicCRS;
import org.opengis.referencing.datum.GeodeticDatum;
import org.opengis.referencing.operation.Conversion;
import org.apache.sis.referencing.privy.AxisDirections;
@@ -129,9 +128,9 @@ final class EllipsoidalHeightSeparator implements
AxisFilter {
* we also need to reduce the number of dimensions in the base CRS and
in the conversion.
*/
if (crs instanceof ProjectedCRS) {
- GeographicCRS baseCRS = ((ProjectedCRS) crs).getBaseCRS();
+ GeodeticCRS baseCRS = ((ProjectedCRS) crs).getBaseCRS();
if (ReferencingUtilities.getDimension(baseCRS) != 2) {
- baseCRS = (GeographicCRS) separate(baseCRS);
+ baseCRS = (GeodeticCRS) separate(baseCRS);
}
Conversion projection = ((ProjectedCRS)
crs).getConversionFromBase();
/*
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultProjectedCRS.java
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultProjectedCRS.java
index 3ffad96664..0a69f68c58 100644
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultProjectedCRS.java
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultProjectedCRS.java
@@ -23,7 +23,7 @@ import jakarta.xml.bind.annotation.XmlRootElement;
import javax.measure.Unit;
import javax.measure.quantity.Angle;
import org.opengis.referencing.crs.ProjectedCRS;
-import org.opengis.referencing.crs.GeographicCRS;
+import org.opengis.referencing.crs.GeodeticCRS;
import org.opengis.referencing.cs.CartesianCS;
import org.opengis.referencing.cs.CoordinateSystem; // For
javadoc
import org.opengis.referencing.datum.GeodeticDatum;
@@ -68,7 +68,7 @@ import org.apache.sis.util.Workaround;
* @since 0.6
*/
@XmlType(name = "ProjectedCRSType", propOrder = {
- "baseCRS",
+ "baseGeodeticCRS",
"coordinateSystem"
})
@XmlRootElement(name = "ProjectedCRS")
@@ -126,10 +126,10 @@ public class DefaultProjectedCRS extends
AbstractDerivedCRS<Projection> implemen
* @throws MismatchedDimensionException if the source and target
dimensions of {@code baseToDerived}
* do not match the dimensions of {@code base} and {@code
derivedCS} respectively.
*
- * @see
org.apache.sis.referencing.factory.GeodeticObjectFactory#createProjectedCRS(Map,
GeographicCRS, Conversion, CartesianCS)
+ * @see
org.apache.sis.referencing.factory.GeodeticObjectFactory#createProjectedCRS(Map,
GeodeticCRS, Conversion, CartesianCS)
*/
public DefaultProjectedCRS(final Map<String,?> properties,
- final GeographicCRS baseCRS,
+ final GeodeticCRS baseCRS,
final Conversion conversion,
final CartesianCS derivedCS)
throws MismatchedDimensionException
@@ -142,7 +142,7 @@ public class DefaultProjectedCRS extends
AbstractDerivedCRS<Projection> implemen
* ("Relax constraint on placement of this()/super() call in
constructors").
*/
@Workaround(library="JDK", version="1.7")
- private static GeographicCRS checkDimensions(final GeographicCRS baseCRS,
final CartesianCS derivedCS) {
+ private static GeodeticCRS checkDimensions(final GeodeticCRS baseCRS,
final CartesianCS derivedCS) {
int n = ReferencingUtilities.getDimension(baseCRS);
if (derivedCS != null) {
n = Math.max(n, derivedCS.getDimension());
@@ -235,8 +235,7 @@ public class DefaultProjectedCRS extends
AbstractDerivedCRS<Projection> implemen
* @return the base coordinate reference system, which must be geographic.
*/
@Override
- @XmlElement(name = "baseGeodeticCRS", required = true) // Note:
older GML version used "baseGeographicCRS".
- public GeographicCRS getBaseCRS() {
+ public GeodeticCRS getBaseCRS() {
final Projection projection = super.getConversionFromBase();
return (projection != null) ? projection.getSourceCRS() : null;
}
@@ -389,14 +388,14 @@ public class DefaultProjectedCRS extends
AbstractDerivedCRS<Projection> implemen
return super.formatTo(formatter);
}
WKTUtilities.appendName(this, formatter, null);
- final Convention convention = formatter.getConvention();
- final boolean isWKT1 = (convention.majorVersion() == 1);
- final CartesianCS cs = getCoordinateSystem();
- final GeographicCRS baseCRS = getBaseCRS();
- final Unit<?> lengthUnit = ReferencingUtilities.getUnit(cs);
- final Unit<Angle> angularUnit =
AxisDirections.getAngularUnit(baseCRS.getCoordinateSystem(), null);
- final Unit<Angle> oldAngle =
formatter.addContextualUnit(angularUnit);
- final Unit<?> oldLength =
formatter.addContextualUnit(lengthUnit);
+ final Convention convention = formatter.getConvention();
+ final boolean isWKT1 = (convention.majorVersion() == 1);
+ final CartesianCS cs = getCoordinateSystem();
+ final GeodeticCRS baseCRS = getBaseCRS();
+ final Unit<?> lengthUnit = ReferencingUtilities.getUnit(cs);
+ final Unit<Angle> angularUnit =
AxisDirections.getAngularUnit(baseCRS.getCoordinateSystem(), null);
+ final Unit<Angle> oldAngle =
formatter.addContextualUnit(angularUnit);
+ final Unit<?> oldLength =
formatter.addContextualUnit(lengthUnit);
/*
* Format the enclosing base CRS. Note that WKT 1 formats a full
GeographicCRS while WKT 2 formats only
* the datum with the prime meridian (no coordinate system) and uses a
different keyword ("BaseGeodCRS"
@@ -452,13 +451,20 @@ public class DefaultProjectedCRS extends
AbstractDerivedCRS<Projection> implemen
private DefaultProjectedCRS() {
}
+ /**
+ * Used by JAXB only (invoked by reflection). We do not use adapter
because,
+ * for an unknown reason, doing so cause an infinite loop in Glassfish
JAXB.
+ */
+ @XmlElement(name = "baseGeodeticCRS", required = true) // Note: older
GML version used "baseGeographicCRS".
+ private SC_GeodeticCRS getBaseGeodeticCRS() {
+ return new SC_GeodeticCRS(getBaseCRS());
+ }
+
/**
* Used by JAXB only (invoked by reflection).
- *
- * @see #getBaseCRS()
*/
- private void setBaseCRS(final GeographicCRS crs) {
- setBaseCRS("baseGeodeticCRS", crs);
+ private void setBaseGeodeticCRS(final SC_GeodeticCRS crs) {
+ setBaseCRS("baseGeodeticCRS", crs.getElement());
}
/**
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/SC_GeographicCRS.java
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/SC_GeodeticCRS.java
similarity index 73%
rename from
endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/SC_GeographicCRS.java
rename to
endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/SC_GeodeticCRS.java
index d4d3fc7ab0..cf7567bc8f 100644
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/SC_GeographicCRS.java
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/SC_GeodeticCRS.java
@@ -17,12 +17,12 @@
package org.apache.sis.referencing.crs;
import jakarta.xml.bind.annotation.XmlElement;
-import org.opengis.referencing.crs.GeographicCRS;
+import org.opengis.referencing.crs.GeodeticCRS;
import org.apache.sis.xml.bind.gco.PropertyType;
/**
- * JAXB adapter for {@link GeographicCRS}, in order to integrate the value in
an element
+ * JAXB adapter for {@link GeodeticCRS}, in order to integrate the value in an
element
* complying with OGC/ISO standard.
*
* <p><b>Note:</b> JAXB adapters are usually declared in the {@link
org.apache.sis.xml.bind.referencing} package,
@@ -30,11 +30,11 @@ import org.apache.sis.xml.bind.gco.PropertyType;
*
* @author Martin Desruisseaux (Geomatys)
*/
-final class SC_GeographicCRS extends PropertyType<SC_GeographicCRS,
GeographicCRS> {
+final class SC_GeodeticCRS extends PropertyType<SC_GeodeticCRS, GeodeticCRS> {
/**
* Empty constructor for JAXB only.
*/
- public SC_GeographicCRS() {
+ public SC_GeodeticCRS() {
}
/**
@@ -42,30 +42,30 @@ final class SC_GeographicCRS extends
PropertyType<SC_GeographicCRS, GeographicCR
* This method is indirectly invoked by the private constructor
* below, so it shall not depend on the state of this object.
*
- * @return {@code GeographicCRS.class}
+ * @return {@code GeodeticCRS.class}
*/
@Override
- protected Class<GeographicCRS> getBoundType() {
- return GeographicCRS.class;
+ protected Class<GeodeticCRS> getBoundType() {
+ return GeodeticCRS.class;
}
/**
* Constructor for the {@link #wrap} method only.
*/
- private SC_GeographicCRS(final GeographicCRS cs) {
- super(cs);
+ SC_GeodeticCRS(final GeodeticCRS crs) {
+ super(crs);
}
/**
* Invoked by {@link PropertyType} at marshalling time for wrapping the
given value
* in a {@code <gml:GeodeticCRS>} XML element.
*
- * @param cs the element to marshal.
+ * @param crs the element to marshal.
* @return a {@code PropertyType} wrapping the given the element.
*/
@Override
- protected SC_GeographicCRS wrap(final GeographicCRS cs) {
- return new SC_GeographicCRS(cs);
+ protected SC_GeodeticCRS wrap(final GeodeticCRS crs) {
+ return new SC_GeodeticCRS(crs);
}
/**
@@ -77,7 +77,8 @@ final class SC_GeographicCRS extends
PropertyType<SC_GeographicCRS, GeographicCR
*/
@XmlElement(name = "GeodeticCRS")
public DefaultGeodeticCRS getElement() {
- final GeographicCRS metadata = this.metadata;
+ @SuppressWarnings("LocalVariableHidesMemberVariable")
+ final GeodeticCRS metadata = this.metadata;
if (metadata == null || metadata instanceof DefaultGeodeticCRS) {
return (DefaultGeodeticCRS) metadata;
} else {
@@ -88,13 +89,9 @@ final class SC_GeographicCRS extends
PropertyType<SC_GeographicCRS, GeographicCR
/**
* Invoked by JAXB at unmarshalling time for storing the result
temporarily.
*
- * @param cs the unmarshalled element.
+ * @param crs the unmarshalled element.
*/
- public void setElement(final DefaultGeodeticCRS cs) {
- if (cs == null || cs instanceof GeographicCRS) {
- metadata = (GeographicCRS) cs;
- } else {
- metadata = new DefaultGeographicCRS(cs);
- }
+ public void setElement(final DefaultGeodeticCRS crs) {
+ metadata = crs;
}
}
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/package-info.java
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/package-info.java
index d71a18efa6..f4dd7163af 100644
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/package-info.java
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/package-info.java
@@ -114,7 +114,7 @@
@XmlJavaTypeAdapter(CS_UserDefinedCS.class),
@XmlJavaTypeAdapter(CS_VerticalCS.class),
@XmlJavaTypeAdapter(CC_Conversion.class),
- @XmlJavaTypeAdapter(SC_GeographicCRS.class),
+// @XmlJavaTypeAdapter(SC_GeodeticCRS.class), // Causes an infinite
loop. Replaced by direct instantiation.
@XmlJavaTypeAdapter(StringAdapter.class),
@XmlJavaTypeAdapter(InternationalStringConverter.class)
})
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/CommonAuthorityFactory.java
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/CommonAuthorityFactory.java
index 76a29a557f..44bbe1210d 100644
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/CommonAuthorityFactory.java
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/CommonAuthorityFactory.java
@@ -35,6 +35,7 @@ import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.referencing.crs.CRSAuthorityFactory;
import org.opengis.referencing.crs.EngineeringCRS;
import org.opengis.referencing.crs.GeographicCRS;
+import org.opengis.referencing.crs.GeodeticCRS;
import org.opengis.referencing.crs.ProjectedCRS;
import org.opengis.referencing.crs.VerticalCRS;
import org.opengis.referencing.crs.TemporalCRS;
@@ -591,7 +592,7 @@ public class CommonAuthorityFactory extends
GeodeticAuthorityFactory implements
* because the WMS specification does not said that we should.
*/
final CommonCRS datum = CommonCRS.WGS84;
- final GeographicCRS baseCRS; // To be set, directly or
indirectly, to WGS84.geographic().
+ final GeodeticCRS baseCRS; // To be set, directly or
indirectly, to WGS84.geographic().
final ProjectedCRS crs; // Temporary UTM
projection, for extracting other properties.
CartesianCS cs; // Coordinate system with
(E,N) axes in metres.
try {
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/GeodeticObjectFactory.java
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/GeodeticObjectFactory.java
index 5ad6bca3f5..0a7fe5b979 100644
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/GeodeticObjectFactory.java
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/GeodeticObjectFactory.java
@@ -781,7 +781,7 @@ public class GeodeticObjectFactory extends AbstractFactory
implements CRSFactory
*/
@Override
public ProjectedCRS createProjectedCRS(final Map<String,?> properties,
- final GeographicCRS baseCRS, final Conversion conversion,
+ final GeodeticCRS baseCRS, final Conversion conversion,
final CartesianCS derivedCS) throws FactoryException
{
final DefaultProjectedCRS crs;
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
index 56005e8379..9db5519cb2 100644
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
@@ -1686,8 +1686,8 @@ public class MultiAuthoritiesFactory extends
GeodeticAuthorityFactory implements
if (baseCRS != null && fromBase.getSourceCRS() == null &&
fromBase.getTargetCRS() == null) {
final Map<String,?> properties =
IdentifiedObjects.getProperties(fromBase, Datum.IDENTIFIERS_KEY);
final CRSFactory factory = GeodeticObjectFactory.provider();
- if (baseCRS instanceof GeographicCRS && cs instanceof CartesianCS)
{
- return factory.createProjectedCRS(properties, (GeographicCRS)
baseCRS, fromBase, (CartesianCS) cs);
+ if (baseCRS instanceof GeodeticCRS && cs instanceof CartesianCS) {
+ return factory.createProjectedCRS(properties, (GeodeticCRS)
baseCRS, fromBase, (CartesianCS) cs);
} else {
return factory.createDerivedCRS(properties, baseCRS, fromBase,
cs);
}
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
index b7b6a74d2e..30a53e2475 100644
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
@@ -1486,7 +1486,7 @@ codes: for (int i=0; i<codes.length; i++) {
}
try {
/*
- * For a ProjectedCRS, the baseCRS is always
geographic. So in theory we would not
+ * For a ProjectedCRS, the baseCRS is always
geodetic. So in theory we would not
* need the `instanceof` check. However, the
EPSG dataset version 8.9 also uses the
* "projected" type for CRS that are actually
derived CRS. See EPSG:5820 and 5821.
*
@@ -1499,8 +1499,8 @@ codes: for (int i=0; i<codes.length; i++) {
@SuppressWarnings("LocalVariableHidesMemberVariable")
final Map<String,Object> properties =
createProperties("Coordinate Reference System",
name,
epsg, area, scope, remarks, deprecated);
- if (baseCRS instanceof GeographicCRS) {
- crs =
crsFactory.createProjectedCRS(properties, (GeographicCRS) baseCRS, op, cs);
+ if (baseCRS instanceof GeodeticCRS) {
+ crs =
crsFactory.createProjectedCRS(properties, (GeodeticCRS) baseCRS, op, cs);
} else {
crs =
crsFactory.createDerivedCRS(properties, baseCRS, op, cs);
}
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultConversion.java
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultConversion.java
index 4c383dff45..1e76500102 100644
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultConversion.java
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultConversion.java
@@ -65,8 +65,7 @@ import org.apache.sis.util.resources.Errors;
*
* <p>After the source and target CRS become known, we can invoke the {@link
#specialize specialize(…)} method for
* {@linkplain DefaultMathTransformFactory#createParameterizedTransform
creating a math transform from the parameters},
- * instantiate a new {@code Conversion} of a more specific type
- * ({@link org.opengis.referencing.operation.Projection}) if relevant,
+ * instantiate a new {@code Conversion} of a more specific type ({@link
Projection}) if relevant,
* and assign the source and target CRS to it.</p>
*
* <h2>Immutability and thread safety</h2>
@@ -360,8 +359,8 @@ public class DefaultConversion extends
AbstractSingleOperation implements Conver
*
* <p>The given {@code baseType} argument can be one of the following
values:</p>
* <ul>
- * <li><code>{@linkplain
org.opengis.referencing.operation.Conversion}.class</code></li>
- * <li><code>{@linkplain
org.opengis.referencing.operation.Projection}.class</code></li>
+ * <li><code>{@linkplain Conversion}.class</code></li>
+ * <li><code>{@linkplain Projection}.class</code></li>
* </ul>
*
* This {@code specialize(…)} method returns a conversion which implement
at least the given {@code baseType}
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
index 1903225188..bbf45d2eef 100644
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
@@ -28,7 +28,7 @@ import org.opengis.referencing.AuthorityFactory;
import org.opengis.referencing.IdentifiedObject;
import org.opengis.referencing.operation.*;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
-import org.opengis.referencing.crs.GeographicCRS;
+import org.opengis.referencing.crs.GeodeticCRS;
import org.opengis.referencing.crs.ProjectedCRS;
import org.opengis.referencing.crs.SingleCRS;
import org.opengis.referencing.crs.CRSFactory;
@@ -561,7 +561,7 @@ next: for (int i=components.size(); --i >= 0;) {
*/
if (baseType == SingleOperation.class) {
if (isConversion(sourceCRS, targetCRS)) {
- if (interpolationCRS == null && sourceCRS instanceof
GeographicCRS
+ if (interpolationCRS == null && sourceCRS instanceof
GeodeticCRS
&& targetCRS instanceof
ProjectedCRS)
{
baseType = Projection.class;
@@ -586,13 +586,13 @@ next: for (int i=components.size(); --i >= 0;) {
if (Transformation.class.isAssignableFrom(baseType)) {
op = new DefaultTransformation(properties, sourceCRS, targetCRS,
interpolationCRS, method, transform);
} else if (Projection.class.isAssignableFrom(baseType)) {
- ArgumentChecks.ensureCanCast("sourceCRS", GeographicCRS.class,
sourceCRS);
- ArgumentChecks.ensureCanCast("targetCRS", ProjectedCRS .class,
targetCRS);
+ ArgumentChecks.ensureCanCast("sourceCRS", GeodeticCRS .class,
sourceCRS);
+ ArgumentChecks.ensureCanCast("targetCRS", ProjectedCRS.class,
targetCRS);
if (interpolationCRS != null) {
throw new IllegalArgumentException(Errors.format(
Errors.Keys.ForbiddenAttribute_2, "interpolationCRS",
baseType));
}
- op = new DefaultProjection(properties, (GeographicCRS) sourceCRS,
(ProjectedCRS) targetCRS, method, transform);
+ op = new DefaultProjection(properties, (GeodeticCRS) sourceCRS,
(ProjectedCRS) targetCRS, method, transform);
} else if (Conversion.class.isAssignableFrom(baseType)) {
op = new DefaultConversion(properties, sourceCRS, targetCRS,
interpolationCRS, method, transform);
} else { // See above comment about this last-resort fallback.
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultProjection.java
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultProjection.java
index fe4ab2a377..123b12a327 100644
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultProjection.java
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultProjection.java
@@ -24,8 +24,8 @@ import org.opengis.referencing.operation.Projection;
import org.opengis.referencing.operation.OperationMethod;
import org.opengis.referencing.operation.MathTransform;
import org.opengis.referencing.operation.MathTransformFactory;
+import org.opengis.referencing.crs.GeodeticCRS;
import org.opengis.referencing.crs.ProjectedCRS;
-import org.opengis.referencing.crs.GeographicCRS;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.apache.sis.util.ArgumentChecks;
@@ -67,7 +67,7 @@ final class DefaultProjection extends DefaultConversion
implements Projection {
* @param transform transform from positions in the source CRS to
positions in the target CRS.
*/
public DefaultProjection(final Map<String,?> properties,
- final GeographicCRS sourceCRS,
+ final GeodeticCRS sourceCRS,
final ProjectedCRS targetCRS,
final OperationMethod method,
final MathTransform transform)
@@ -94,8 +94,8 @@ final class DefaultProjection extends DefaultConversion
implements Projection {
final OperationMethod[] actual) throws FactoryException
{
super(definition, sourceCRS, targetCRS, factory, actual);
- ArgumentChecks.ensureCanCast("sourceCRS", GeographicCRS.class,
sourceCRS);
- ArgumentChecks.ensureCanCast("targetCRS", ProjectedCRS .class,
targetCRS);
+ ArgumentChecks.ensureCanCast("sourceCRS", GeodeticCRS.class,
sourceCRS);
+ ArgumentChecks.ensureCanCast("targetCRS", ProjectedCRS.class,
targetCRS);
}
/**
@@ -125,8 +125,8 @@ final class DefaultProjection extends DefaultConversion
implements Projection {
* Returns the source CRS, which must be geographic or {@code null}.
*/
@Override
- public final GeographicCRS getSourceCRS() {
- return (GeographicCRS) super.getSourceCRS();
+ public final GeodeticCRS getSourceCRS() {
+ return (GeodeticCRS) super.getSourceCRS();
}
/**
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/privy/EllipsoidalHeightCombiner.java
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/privy/EllipsoidalHeightCombiner.java
index 0780da7d33..249e950938 100644
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/privy/EllipsoidalHeightCombiner.java
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/privy/EllipsoidalHeightCombiner.java
@@ -148,9 +148,9 @@ public final class EllipsoidalHeightCombiner {
crs =
factories.getCRSFactory().createGeographicCRS(crsProps, ((GeodeticCRS)
crs).getDatum(), (EllipsoidalCS) cs);
} else {
final ProjectedCRS proj = (ProjectedCRS) crs;
- GeographicCRS base = proj.getBaseCRS();
+ GeodeticCRS base = proj.getBaseCRS();
if (base.getCoordinateSystem().getDimension() == 2) {
- base = (GeographicCRS) createCompoundCRS(
+ base = (GeodeticCRS) createCompoundCRS(
IdentifiedObjects.getProperties(base,
GeographicCRS.IDENTIFIERS_KEY), base, vertical);
}
/*
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/privy/GeodeticObjectBuilder.java
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/privy/GeodeticObjectBuilder.java
index cf72daddfc..80f8395edf 100644
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/privy/GeodeticObjectBuilder.java
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/privy/GeodeticObjectBuilder.java
@@ -33,6 +33,7 @@ import org.opengis.parameter.ParameterNotFoundException;
import org.opengis.parameter.InvalidParameterValueException;
import org.opengis.referencing.IdentifiedObject;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.opengis.referencing.crs.GeodeticCRS;
import org.opengis.referencing.crs.GeographicCRS;
import org.opengis.referencing.crs.ProjectedCRS;
import org.opengis.referencing.crs.TemporalCRS;
@@ -466,7 +467,7 @@ public class GeodeticObjectBuilder extends
Builder<GeodeticObjectBuilder> {
* @return the projected CRS.
* @throws FactoryException if an error occurred while building the
projected CRS.
*/
- public ProjectedCRS createProjectedCRS(final GeographicCRS baseCRS,
CartesianCS derivedCS) throws FactoryException {
+ public ProjectedCRS createProjectedCRS(final GeodeticCRS baseCRS,
CartesianCS derivedCS) throws FactoryException {
ensureConversionMethodSet();
onCreate(false);
try {
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/xml/bind/referencing/SC_GeodeticCRS.md
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/xml/bind/referencing/SC_GeodeticCRS.md
new file mode 100644
index 0000000000..7cead9d472
--- /dev/null
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/xml/bind/referencing/SC_GeodeticCRS.md
@@ -0,0 +1,2 @@
+The `SC_GeodeticCRS` adapter is defined in the `org.apache.sis.referencing.crs`
+package because it needs access to `DefaultGeodeticCRS` package-private
methods.
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/xml/bind/referencing/SC_GeographicCRS.md
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/xml/bind/referencing/SC_GeographicCRS.md
deleted file mode 100644
index 961fa2048b..0000000000
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/xml/bind/referencing/SC_GeographicCRS.md
+++ /dev/null
@@ -1,4 +0,0 @@
-The `SC_GeographicCRS` adapter is defined in the
`org.apache.sis.referencing.crs`
-package because it needs access to `DefaultGeodeticCRS` package-private
methods.
-Note also that `GeographicCRS` does not exist in GML, so this is a special case
-anyway.
diff --git
a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/geometry/TransformTestCase.java
b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/geometry/TransformTestCase.java
index 49f803287b..3909c420be 100644
---
a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/geometry/TransformTestCase.java
+++
b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/geometry/TransformTestCase.java
@@ -18,6 +18,7 @@ package org.apache.sis.geometry;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.referencing.crs.GeographicCRS;
+import org.opengis.referencing.crs.GeodeticCRS;
import org.opengis.referencing.crs.ProjectedCRS;
import org.opengis.referencing.operation.Conversion;
import org.opengis.referencing.operation.CoordinateOperation;
@@ -95,7 +96,7 @@ public abstract class TransformTestCase<G> extends TestCase {
@Test
public final void testTransform() throws FactoryException,
TransformException {
final ProjectedCRS targetCRS = CommonCRS.WGS84.universal(10,
-123.5);
- final GeographicCRS sourceCRS = targetCRS.getBaseCRS();
+ final GeodeticCRS sourceCRS = targetCRS.getBaseCRS();
final Conversion conversion = targetCRS.getConversionFromBase();
final MathTransform2D transform = (MathTransform2D)
conversion.getMathTransform();
/*
@@ -130,7 +131,7 @@ public abstract class TransformTestCase<G> extends TestCase
{
@Test
public final void testTransformOverPole() throws FactoryException,
TransformException {
final ProjectedCRS sourceCRS =
HardCodedConversions.createCRS(HardCodedConversions.POLAR_STEREOGRAPHIC);
- final GeographicCRS targetCRS = sourceCRS.getBaseCRS();
+ final GeodeticCRS targetCRS = sourceCRS.getBaseCRS();
final Conversion conversion =
inverse(sourceCRS.getConversionFromBase());
final MathTransform2D transform = (MathTransform2D)
conversion.getMathTransform();
/*
@@ -193,7 +194,7 @@ public abstract class TransformTestCase<G> extends TestCase
{
@Test
public final void testTransformNotOverPole() throws FactoryException,
TransformException {
final ProjectedCRS sourceCRS = CommonCRS.WGS84.universal(10, -3.5);
- final GeographicCRS targetCRS = sourceCRS.getBaseCRS();
+ final GeodeticCRS targetCRS = sourceCRS.getBaseCRS();
final Conversion conversion =
inverse(sourceCRS.getConversionFromBase());
final G rectangle = createFromExtremums(sourceCRS, 199980, 4490220,
309780, 4600020);
final G expected = createFromExtremums(targetCRS,
@@ -213,7 +214,7 @@ public abstract class TransformTestCase<G> extends TestCase
{
@Test
public final void testTransformOverAntiMeridian() throws
TransformException {
final ProjectedCRS sourceCRS = HardCodedConversions.mercator();
- final GeographicCRS targetCRS = sourceCRS.getBaseCRS();
+ final GeodeticCRS targetCRS = sourceCRS.getBaseCRS();
final Conversion conversion =
inverse(sourceCRS.getConversionFromBase());
final G expected = createFromExtremums(targetCRS, 179, 40, 181, 50);
final G rectangle = createFromExtremums(sourceCRS,
@@ -233,9 +234,9 @@ public abstract class TransformTestCase<G> extends TestCase
{
*/
@Test
public void testProjectionOutsideLongitudeRange() throws FactoryException,
TransformException {
- final ProjectedCRS sourceCRS =
HardCodedConversions.createCRS(HardCodedConversions.UTM);
- final GeographicCRS targetCRS = sourceCRS.getBaseCRS();
- final Conversion conversion =
inverse(sourceCRS.getConversionFromBase());
+ final ProjectedCRS sourceCRS =
HardCodedConversions.createCRS(HardCodedConversions.UTM);
+ final GeodeticCRS targetCRS = sourceCRS.getBaseCRS();
+ final Conversion conversion =
inverse(sourceCRS.getConversionFromBase());
final G rectangle = createFromExtremums(sourceCRS,
-402748, 7965673, // Computed by
SIS (not validated by external authority).
1312383, 9912935);
diff --git
a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/io/wkt/GeodeticObjectParserTest.java
b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/io/wkt/GeodeticObjectParserTest.java
index dd36e4cae3..fab9ed6afd 100644
---
a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/io/wkt/GeodeticObjectParserTest.java
+++
b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/io/wkt/GeodeticObjectParserTest.java
@@ -539,7 +539,7 @@ public final class GeodeticObjectParserTest extends
TestCase {
assertNameAndIdentifierEqual("Mercator test", 0, crs);
verifyProjectedCS(crs.getCoordinateSystem(), Units.METRE);
- verifyGeographicCRS(0, crs.getBaseCRS());
+ verifyGeographicCRS(0, assertInstanceOf(GeographicCRS.class,
crs.getBaseCRS()));
final GeodeticDatum datum = crs.getDatum();
assertNameAndIdentifierEqual("World Geodetic System 1984", 0, datum);
@@ -824,7 +824,7 @@ public final class GeodeticObjectParserTest extends
TestCase {
assertNameAndIdentifierEqual("FRANCE/NTF/Lambert III", 0, crs);
verifyProjectedCS(crs.getCoordinateSystem(), Units.METRE);
- final GeographicCRS geoCRS = crs.getBaseCRS();
+ final GeographicCRS geoCRS = assertInstanceOf(GeographicCRS.class,
crs.getBaseCRS());
assertNameAndIdentifierEqual("NTF=GR3DF97A", 0, geoCRS); //
Inherited the datum name.
final GeodeticDatum datum = geoCRS.getDatum();
diff --git
a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java
b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java
index cce8372c36..8376c09f8c 100644
---
a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java
+++
b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java
@@ -23,7 +23,7 @@ import org.opengis.referencing.crs.ProjectedCRS;
import org.opengis.referencing.crs.GeographicCRS;
import org.opengis.referencing.cs.AxisDirection;
import org.opengis.referencing.cs.CartesianCS;
-import org.opengis.referencing.operation.Projection;
+import org.opengis.referencing.operation.Conversion;
import org.opengis.parameter.ParameterValueGroup;
import org.apache.sis.metadata.iso.citation.Citations;
import org.apache.sis.referencing.CommonCRS;
@@ -502,7 +502,7 @@ public final class DefaultProjectedCRSTest extends
TestCase.WithLogs {
assertAxisDirectionsEqual(crs.getBaseCRS().getCoordinateSystem(),
AxisDirection.NORTH, AxisDirection.EAST);
assertAxisDirectionsEqual(crs.getCoordinateSystem(),
AxisDirection.EAST, AxisDirection.NORTH);
- final Projection conversion = crs.getConversionFromBase();
+ final Conversion conversion = crs.getConversionFromBase();
assertEpsgNameAndIdentifierEqual("Lambert zone II", 18082, conversion);
assertEpsgNameAndIdentifierEqual("Lambert Conic Conformal (1SP)",
9801, conversion.getMethod());
assertNotNull(conversion.getMathTransform());
diff --git
a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/report/CoordinateReferenceSystems.java
b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/report/CoordinateReferenceSystems.java
index 8849db42cc..feab090c11 100644
---
a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/report/CoordinateReferenceSystems.java
+++
b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/report/CoordinateReferenceSystems.java
@@ -427,7 +427,7 @@ public final class CoordinateReferenceSystems extends
AuthorityCodesReport {
} else if (cs instanceof SphericalCS) {
return "Geocentric (spherical coordinate system)";
}
- return "Geocentric";
+ return "Geodetic";
}
if (crs instanceof VerticalCRS vertical) {
final Optional<RealizationMethod> method =
vertical.getDatum().getRealizationMethod();
diff --git
a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/test/integration/CoordinateReferenceSystemTest.java
b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/test/integration/CoordinateReferenceSystemTest.java
index 8ef6919d9e..8e1fc77d72 100644
---
a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/test/integration/CoordinateReferenceSystemTest.java
+++
b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/test/integration/CoordinateReferenceSystemTest.java
@@ -20,7 +20,7 @@ import org.opengis.util.FactoryException;
import org.opengis.referencing.cs.CartesianCS;
import org.opengis.referencing.cs.EllipsoidalCS;
import org.opengis.referencing.crs.DerivedCRS;
-import org.opengis.referencing.crs.GeodeticCRS;
+import org.opengis.referencing.crs.ProjectedCRS;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.apache.sis.referencing.CRS;
@@ -65,14 +65,14 @@ public final class CoordinateReferenceSystemTest extends
TestCase {
public void testDerivedCRS() throws FactoryException {
assertTrue(TestFactorySource.getSharedFactory() != null);
CoordinateReferenceSystem crs = CRS.forCode("EPSG:5820");
- assertInstanceOf(DerivedCRS .class, crs);
- assertInstanceOf(GeodeticCRS.class, crs);
- assertInstanceOf(CartesianCS.class, crs.getCoordinateSystem());
- assertInstanceOf(CartesianCS.class, ((DerivedCRS)
crs).getBaseCRS().getCoordinateSystem());
+ assertInstanceOf(DerivedCRS .class, crs);
+ assertInstanceOf(ProjectedCRS.class, crs);
+ assertInstanceOf(CartesianCS .class, crs.getCoordinateSystem());
+ assertInstanceOf(CartesianCS .class, ((DerivedCRS)
crs).getBaseCRS().getCoordinateSystem());
/*
- * Some tests are disabled because `EPSGDataAccess` confuse this
derived CRS
- * with a projected CRS. We are waiting for upgrade to EPSG database
10+
- * before to re-evaluate how to fix this issue.
+ * Some tests are disabled because `EPSGDataAccess` confuses CRS type.
+ * We are waiting for upgrade to EPSG database 10+ before to
re-evaluate
+ * how to fix this issue.
*
* https://issues.apache.org/jira/browse/SIS-518
*/
diff --git
a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/reader/CRSBuilder.java
b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/reader/CRSBuilder.java
index 0412578521..3f2cae1de1 100644
---
a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/reader/CRSBuilder.java
+++
b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/reader/CRSBuilder.java
@@ -1098,7 +1098,7 @@ public final class CRSBuilder extends
ReferencingFactoryContainer {
* @param crs the CRS created from the EPSG geodetic dataset.
* @param angularUnit the angular unit of the latitude and longitude
values.
*/
- private void verify(final GeographicCRS crs, final Unit<Angle>
angularUnit) throws FactoryException {
+ private void verify(final GeodeticCRS crs, final Unit<Angle> angularUnit)
throws FactoryException {
/*
* Note: current createUnit(…) implementation does not allow us to
distinguish whether METRE ou DEGREE units
* were specified in the GeoTIFF file or if we got the default values.
We do not compare units for that reason.
@@ -1308,7 +1308,7 @@ public final class CRSBuilder extends
ReferencingFactoryContainer {
private void verify(final ProjectedCRS crs) throws FactoryException {
final Unit<Length> linearUnit = createLinearUnit(UnitKey.PROJECTED);
final Unit<Angle> angularUnit = createAngularUnit(UnitKey.ANGULAR);
- final GeographicCRS baseCRS = crs.getBaseCRS();
+ final GeodeticCRS baseCRS = crs.getBaseCRS();
verifyIdentifier(crs, baseCRS, GeoKeys.GeodeticCRS);
verify(baseCRS, angularUnit);
final Conversion projection = crs.getConversionFromBase();
diff --git a/geoapi/snapshot b/geoapi/snapshot
index 535e3e0647..b822d026bd 160000
--- a/geoapi/snapshot
+++ b/geoapi/snapshot
@@ -1 +1 @@
-Subproject commit 535e3e0647e8849d4dead1ced6f622428b539ffd
+Subproject commit b822d026bd9e4692a159a9bd2bc158716da2e721