This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch geoapi-3.1 in repository https://gitbox.apache.org/repos/asf/sis.git
commit 798a145e1e56c102494c63cadba1f286fb1a9bad Merge: f0d4a254e4 247d4bb78e Author: Martin Desruisseaux <martin.desruisse...@geomatys.com> AuthorDate: Mon Apr 15 19:01:28 2024 +0200 Merge branch 'geoapi-4.0' into geoapi-3.1, but keep implementing the `GeocentricCRS` interface even if deprecated. However with this commit, the code now avoids to depend on that interface. .../org/apache/sis/buildtools/book/GEOAPI.lst | 1 - .../apache/sis/io/wkt/GeodeticObjectParser.java | 7 +-- .../main/org/apache/sis/referencing/CommonCRS.java | 17 +++--- .../apache/sis/referencing/crs/AbstractCRS.java | 26 ++++++++- .../sis/referencing/crs/DefaultDerivedCRS.java | 51 ++++++++++-------- .../sis/referencing/crs/DefaultGeocentricCRS.java | 52 ++++++++++-------- .../sis/referencing/crs/DefaultGeodeticCRS.java | 15 +++++- .../sis/referencing/crs/DefaultGeographicCRS.java | 32 +++++------ .../sis/referencing/crs/DefaultParametricCRS.java | 1 + .../sis/referencing/crs/DefaultTemporalCRS.java | 1 + .../sis/referencing/crs/DefaultVerticalCRS.java | 1 + .../sis/referencing/crs/SC_GeographicCRS.java | 5 +- .../org/apache/sis/referencing/crs/SubTypes.java | 32 ++--------- .../referencing/factory/AuthorityFactoryProxy.java | 13 ++++- .../factory/ConcurrentAuthorityFactory.java | 24 +++++++-- .../factory/GeodeticAuthorityFactory.java | 18 ++++++- .../referencing/factory/GeodeticObjectFactory.java | 62 +++++++++++++++++++--- .../factory/MultiAuthoritiesFactory.java | 17 ++++-- .../referencing/factory/sql/EPSGDataAccess.java | 4 +- .../referencing/internal/EPSGFactoryProxyCRS.java | 9 +++- .../apache/sis/referencing/internal/Legacy.java | 14 +++++ .../operation/DefaultOperationMethod.java | 1 - .../operation/provider/AbstractProvider.java | 2 +- .../referencing/privy/ReferencingUtilities.java | 2 +- .../apache/sis/referencing/privy/WKTKeywords.java | 5 +- .../apache/sis/xml/bind/referencing/SC_CRS.java | 4 +- .../sis/io/wkt/GeodeticObjectParserTest.java | 3 +- .../org/apache/sis/referencing/CommonCRSTest.java | 8 ++- .../sis/referencing/EPSGFactoryFallbackTest.java | 14 +++-- .../sis/referencing/crs/DefaultDerivedCRSTest.java | 24 ++++----- .../referencing/factory/AuthorityFactoryMock.java | 5 +- .../factory/MultiAuthoritiesFactoryTest.java | 3 -- .../referencing/factory/sql/EPSGFactoryTest.java | 3 +- .../operation/CoordinateOperationFinderTest.java | 5 +- .../sis/referencing/privy/WKTKeywordsTest.java | 5 +- .../report/CoordinateReferenceSystems.java | 4 +- .../sis/storage/geotiff/reader/CRSBuilder.java | 12 ++--- .../apache/sis/storage/netcdf/base/CRSBuilder.java | 7 ++- geoapi/snapshot | 2 +- .../org/apache/sis/gui/referencing/CRSChooser.java | 4 +- 40 files changed, 324 insertions(+), 191 deletions(-) diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/AbstractCRS.java index 3a6a1f637a,38c5dff592..44dd64e661 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/AbstractCRS.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/AbstractCRS.java @@@ -223,12 -246,10 +246,11 @@@ public class AbstractCRS extends Abstra * <li>If the given object is {@code null}, then this method returns {@code null}.</li> * <li>Otherwise if the given object is an instance of * {@link org.opengis.referencing.crs.GeodeticCRS} (including the - * {@link org.opengis.referencing.crs.GeographicCRS} and - * {@link org.opengis.referencing.crs.GeocentricCRS} subtypes), + * {@link org.opengis.referencing.crs.GeographicCRS subtype}), * {@link org.opengis.referencing.crs.VerticalCRS}, * {@link org.opengis.referencing.crs.TemporalCRS}, - * {@link org.opengis.referencing.crs.EngineeringCRS} or + * {@link org.opengis.referencing.crs.EngineeringCRS}, + * {@link org.opengis.referencing.crs.ImageCRS} or * {@link org.apache.sis.referencing.cs.DefaultCompoundCS}, * then this method delegates to the {@code castOrCopy(…)} method of the corresponding SIS subclass. * Note that if the given object implements more than one of the above-cited interfaces, diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultDerivedCRS.java index 1cc86465d3,21aec9e2b5..6a01107efb --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultDerivedCRS.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultDerivedCRS.java @@@ -368,7 -369,7 +369,7 @@@ public class DefaultDerivedCRS extends if (object == null || object instanceof DefaultDerivedCRS) { return (DefaultDerivedCRS) object; } else { - final String type = getType((SingleCRS) object.getBaseCRS(), object.getCoordinateSystem()); - final String type = getTypeKeyword(null, object.getBaseCRS(), object.getCoordinateSystem()); ++ final String type = getTypeKeyword(null, (SingleCRS) object.getBaseCRS(), object.getCoordinateSystem()); if (type != null) switch (type) { case WKTKeywords.GeodeticCRS: return new Geodetic (object); case WKTKeywords.VerticalCRS: return new Vertical (object); diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java index e8cb41b856,0a812d4823..e616c6f151 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java @@@ -18,9 -18,10 +18,11 @@@ package org.apache.sis.referencing.crs import java.util.Map; import jakarta.xml.bind.annotation.XmlTransient; + import org.opengis.referencing.cs.CoordinateSystem; import org.opengis.referencing.cs.CartesianCS; import org.opengis.referencing.cs.SphericalCS; + import org.opengis.referencing.crs.GeodeticCRS; +import org.opengis.referencing.crs.GeocentricCRS; import org.opengis.referencing.datum.GeodeticDatum; import org.apache.sis.referencing.AbstractReferenceSystem; import org.apache.sis.referencing.cs.AxesConvention; @@@ -79,8 -78,7 +79,8 @@@ import org.apache.sis.io.wkt.Formatter * @since 0.4 */ @XmlTransient - @Deprecated(since = "2.0") -public class DefaultGeocentricCRS extends DefaultGeodeticCRS { ++@SuppressWarnings("deprecation") +public class DefaultGeocentricCRS extends DefaultGeodeticCRS implements GeocentricCRS { /** * Serial number for inter-operability with different versions. */ @@@ -193,18 -202,13 +204,13 @@@ /** * Returns the GeoAPI interface implemented by this class. - * The SIS implementation returns {@code GeodeticCRS.class}. + * The SIS implementation returns {@code GeocentricCRS.class}. * - * <h4>Note for implementers</h4> - * Subclasses usually do not need to override this method since GeoAPI does not define {@code GeocentricCRS} - * sub-interface. Overriding possibility is left mostly for implementers who wish to extend GeoAPI with their - * own set of interfaces. - * - * @return {@code GeodeticCRS.class} or a user-defined sub-interface. + * @return {@code GeocentricCRS.class} or a user-defined sub-interface. */ @Override - public Class<? extends GeodeticCRS> getInterface() { - return super.getInterface(); + public Class<? extends GeocentricCRS> getInterface() { + return GeocentricCRS.class; } /** diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/SubTypes.java index 635941e542,e02e655b75..3e82a452fa --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/SubTypes.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/SubTypes.java @@@ -32,13 -29,8 +29,11 @@@ import org.opengis.referencing.cs.Coord import org.opengis.referencing.cs.CartesianCS; import org.opengis.referencing.cs.EllipsoidalCS; import org.opengis.referencing.cs.SphericalCS; - import org.opengis.referencing.datum.GeodeticDatum; - import org.apache.sis.referencing.IdentifiedObjects; import org.apache.sis.referencing.cs.AxesConvention; +// Specific to the main and geoapi-3.1 branches: +import org.opengis.referencing.crs.ImageCRS; + /** * Implementation of {@link AbstractCRS} methods that require knowledge about subclasses. diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/AuthorityFactoryProxy.java index d2dea321f7,8947411b87..2063b996f8 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/AuthorityFactoryProxy.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/AuthorityFactoryProxy.java @@@ -460,28 -454,16 +460,38 @@@ abstract class AuthorityFactoryProxy<T } }; - @SuppressWarnings("deprecation") ++ @Deprecated(since = "1.5") + static final AuthorityFactoryProxy<GeocentricCRS> GEOCENTRIC_CRS = + new AuthorityFactoryProxy<GeocentricCRS>(GeocentricCRS.class, AuthorityFactoryIdentifier.CRS) { + @Override GeocentricCRS create(GeodeticAuthorityFactory factory, String code) throws FactoryException { + return factory.createGeocentricCRS(code); + } + @Override GeocentricCRS createFromAPI(AuthorityFactory factory, String code) throws FactoryException { + return crsFactory(factory).createGeocentricCRS(code); + } + }; + + static final AuthorityFactoryProxy<GeodeticCRS> GEODETIC_CRS = + new AuthorityFactoryProxy<GeodeticCRS>(GeodeticCRS.class, AuthorityFactoryIdentifier.CRS) { + @Override GeodeticCRS create(GeodeticAuthorityFactory factory, String code) throws FactoryException { + return factory.createGeodeticCRS(code); + } + @Override GeodeticCRS createFromAPI(AuthorityFactory factory, String code) throws FactoryException { + return crsFactory(factory).createGeodeticCRS(code); + } + }; + + @SuppressWarnings("deprecation") + static final AuthorityFactoryProxy<ImageCRS> IMAGE_CRS = + new AuthorityFactoryProxy<ImageCRS>(ImageCRS.class, AuthorityFactoryIdentifier.CRS) { + @Override ImageCRS create(GeodeticAuthorityFactory factory, String code) throws FactoryException { + return factory.createImageCRS(code); + } + @Override ImageCRS createFromAPI(AuthorityFactory factory, String code) throws FactoryException { + return crsFactory(factory).createImageCRS(code); + } + }; + static final AuthorityFactoryProxy<ProjectedCRS> PROJECTED_CRS = new AuthorityFactoryProxy<ProjectedCRS>(ProjectedCRS.class, AuthorityFactoryIdentifier.CRS) { @Override ProjectedCRS create(GeodeticAuthorityFactory factory, String code) throws FactoryException { @@@ -561,10 -543,8 +571,9 @@@ static final AuthorityFactoryProxy<?>[] PROXIES = new AuthorityFactoryProxy<?>[] { PROJECTED_CRS, // Special kind of GeneralDerivedCRS. GEOGRAPHIC_CRS, // Special kind of GeodeticCRS. - GEOCENTRIC_CRS, // Special kind of GeodeticCRS. VERTICAL_CRS, TEMPORAL_CRS, + IMAGE_CRS, // Can be seen as a special kind of EngineeringCRS (even if not shown in hierarchy). ENGINEERING_CRS, DERIVED_CRS, // DerivedCRS can be also Vertical, Temporal or Engineering CRS. Give precedence to those. COMPOUND_CRS, diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java index 200c5d602d,34e23dddab..d413fc2e81 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java @@@ -938,19 -937,15 +938,35 @@@ public abstract class ConcurrentAuthori * * @return the coordinate reference system for the given code. * @throws FactoryException if the object creation failed. + * ++ * @since 1.5 + */ + @Override + public GeodeticCRS createGeodeticCRS(final String code) throws FactoryException { + if (isDefault(GeodeticCRS.class)) { + return super.createGeodeticCRS(code); + } + return create(AuthorityFactoryProxy.GEODETIC_CRS, code); + } + ++ /** ++ * Returns a 3-dimensional coordinate reference system with the origin at the approximate centre of mass of the earth. ++ * ++ * @return the coordinate reference system for the given code. ++ * @throws FactoryException if the object creation failed. ++ * + * @deprecated ISO 19111:2019 does not define an explicit class for geocentric CRS. - * The {@code GeodeticCRS} parent class should be used instead. ++ * Use {@link #createGeodeticCRS(String)} instead. + */ + @Override - @Deprecated(since = "2.0") ++ @Deprecated(since = "1.5") + public GeocentricCRS createGeocentricCRS(final String code) throws FactoryException { + if (isDefault(GeocentricCRS.class)) { + return super.createGeocentricCRS(code); + } + return create(AuthorityFactoryProxy.GEOCENTRIC_CRS, code); + } + /** * Returns a 2-dimensional coordinate reference system used to approximate the shape of the earth on a planar surface. * The default implementation performs the following steps: diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java index 2158b76e30,4985f629fc..dd82d9d24a --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/GeodeticAuthorityFactory.java @@@ -334,15 -332,11 +334,29 @@@ public abstract class GeodeticAuthority * * @see org.apache.sis.referencing.crs.DefaultGeocentricCRS * @see org.apache.sis.referencing.CommonCRS#geocentric() + * ++ * @since 1.5 + */ + public GeodeticCRS createGeodeticCRS(final String code) throws NoSuchAuthorityCodeException, FactoryException { + return cast(GeodeticCRS.class, createCoordinateReferenceSystem(code), code); + } + ++ /** ++ * Creates a 3-dimensional coordinate reference system with the origin at the approximate centre of mass of the earth. ++ * ++ * @param code value allocated by authority. ++ * @return the coordinate reference system for the given code. ++ * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found. ++ * @throws FactoryException if the object creation failed. ++ * + * @deprecated ISO 19111:2019 does not define an explicit class for geocentric CRS. - * The {@code GeodeticCRS} parent class should be used instead. ++ * Use {@link #createGeodeticCRS(String)} instead. + */ - @Deprecated(since = "2.0") ++ @Deprecated(since = "1.5") + public GeocentricCRS createGeocentricCRS(final String code) throws NoSuchAuthorityCodeException, FactoryException { + return cast(GeocentricCRS.class, createCoordinateReferenceSystem(code), code); + } + /** * Creates a 2-dimensional coordinate reference system used to approximate the shape of the earth on a planar surface. * It is done in such a way that the distortion that is inherent to the approximation is carefully controlled and known. diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/GeodeticObjectFactory.java index 9f8c515af1,666eb45942..4ce6146e6e --- 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 @@@ -340,26 -340,22 +340,49 @@@ public class GeodeticObjectFactory exte * @param cs the three-dimensional Cartesian coordinate system for the created CRS. * @throws FactoryException if the object creation failed. * - * @see GeodeticAuthorityFactory#createGeocentricCRS(String) + * @see GeodeticAuthorityFactory#createGeodeticCRS(String) * @see DefaultGeocentricCRS#DefaultGeocentricCRS(Map, GeodeticDatum, CartesianCS) + * ++ * @since 1.5 + */ + @Override + public GeodeticCRS createGeodeticCRS(final Map<String,?> properties, + final GeodeticDatum datum, final CartesianCS cs) throws FactoryException + { + final DefaultGeocentricCRS crs; + try { + crs = new DefaultGeocentricCRS(complete(properties), datum, cs); + } catch (IllegalArgumentException exception) { + throw new InvalidGeodeticParameterException(exception); + } + return unique("createGeodeticCRS", crs); + } + ++ /** ++ * Creates a geocentric coordinate reference system from a Cartesian coordinate system. ++ * ++ * @param properties name and other properties to give to the new object. ++ * @param datum the geodetic datum to use in created CRS. ++ * @param cs the three-dimensional Cartesian coordinate system for the created CRS. ++ * @throws FactoryException if the object creation failed. ++ * + * @deprecated ISO 19111:2019 does not define an explicit class for geocentric CRS. - * The {@code GeodeticCRS} parent class should be used instead. ++ * Use {@link #createGeodeticCRS(Map, GeodeticDatum, CartesianCS)} instead. + */ + @Override - @Deprecated(since = "2.0") ++ @Deprecated(since = "1.5") + public GeocentricCRS createGeocentricCRS(final Map<String,?> properties, + final GeodeticDatum datum, final CartesianCS cs) throws FactoryException + { + final DefaultGeocentricCRS crs; + try { + crs = new DefaultGeocentricCRS(complete(properties), datum, cs); + } catch (IllegalArgumentException exception) { + throw new InvalidGeodeticParameterException(exception); + } + return unique("createGeocentricCRS", crs); + } + /** * Creates a three-dimensional Cartesian coordinate system from the given set of axis. * This coordinate system can be used with geocentric, engineering and derived CRS. @@@ -423,25 -419,21 +446,48 @@@ * @throws FactoryException if the object creation failed. * * @see DefaultGeocentricCRS#DefaultGeocentricCRS(Map, GeodeticDatum, SphericalCS) - * @see GeodeticAuthorityFactory#createGeocentricCRS(String) + * @see GeodeticAuthorityFactory#createGeodeticCRS(String) ++ * ++ * @since 1.5 + */ + @Override + public GeodeticCRS createGeodeticCRS(final Map<String,?> properties, + final GeodeticDatum datum, final SphericalCS cs) throws FactoryException + { + final DefaultGeocentricCRS crs; + try { + crs = new DefaultGeocentricCRS(complete(properties), datum, cs); + } catch (IllegalArgumentException exception) { + throw new InvalidGeodeticParameterException(exception); + } + return unique("createGeodeticCRS", crs); + } + ++ /** ++ * Creates a geocentric coordinate reference system from a spherical coordinate system. ++ * ++ * @param properties name and other properties to give to the new object. ++ * @param datum the geodetic datum to use in created CRS. ++ * @param cs the three-dimensional Cartesian coordinate system for the created CRS. ++ * @throws FactoryException if the object creation failed. + * + * @deprecated ISO 19111:2019 does not define an explicit class for geocentric CRS. - * The {@code GeodeticCRS} parent class should be used instead. ++ * Use {@link #createGeodeticCRS(Map, GeodeticDatum, SphericalCS)} instead. + */ + @Override - @Deprecated(since = "2.0") ++ @Deprecated(since = "1.5") + public GeocentricCRS createGeocentricCRS(final Map<String,?> properties, + final GeodeticDatum datum, final SphericalCS cs) throws FactoryException + { + final DefaultGeocentricCRS crs; + try { + crs = new DefaultGeocentricCRS(complete(properties), datum, cs); + } catch (IllegalArgumentException exception) { + throw new InvalidGeodeticParameterException(exception); + } + return unique("createGeocentricCRS", crs); + } + /** * Creates a spherical coordinate system from the given set of axis. * This coordinate system can be used with geocentric, engineering and derived CRS. diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java index 4f668f6f27,55fe728fb9..90c823c28c --- 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 @@@ -957,16 -956,12 +957,27 @@@ public class MultiAuthoritiesFactory ex * * @return the coordinate reference system for the given code. * @throws FactoryException if the object creation failed. + */ + @Override + public GeodeticCRS createGeodeticCRS(final String code) throws FactoryException { + return create(AuthorityFactoryProxy.GEODETIC_CRS, code); + } + ++ /** ++ * Creates a 3-dimensional coordinate reference system with the origin at the approximate centre of mass of the earth. ++ * ++ * @return the coordinate reference system for the given code. ++ * @throws FactoryException if the object creation failed. + * + * @deprecated ISO 19111:2019 does not define an explicit class for geocentric CRS. - * The {@code GeodeticCRS} parent class should be used instead. ++ * Use {@link #createGeodeticCRS(String)} instead. + */ + @Override - @Deprecated(since = "2.0") ++ @Deprecated(since = "1.5") + public GeocentricCRS createGeocentricCRS(final String code) throws FactoryException { + return create(AuthorityFactoryProxy.GEOCENTRIC_CRS, code); + } + /** * Creates a 2-dimensional coordinate reference system used to approximate the shape of the earth on a planar surface. * The given code can use any of the following patterns, where <var>version</var> is optional: diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/EPSGFactoryProxyCRS.java index 3a44045d7f,38262f0363..5f7e4168c7 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/EPSGFactoryProxyCRS.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/EPSGFactoryProxyCRS.java @@@ -21,7 -21,7 +21,8 @@@ import org.opengis.referencing.crs.Comp import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.crs.DerivedCRS; import org.opengis.referencing.crs.EngineeringCRS; + import org.opengis.referencing.crs.GeodeticCRS; +import org.opengis.referencing.crs.GeocentricCRS; import org.opengis.referencing.crs.GeographicCRS; import org.opengis.referencing.crs.ProjectedCRS; import org.opengis.referencing.crs.TemporalCRS; @@@ -81,18 -78,11 +82,22 @@@ public final class EPSGFactoryProxyCRS return factory().createGeographicCRS(code); } - @Override - @Deprecated(since = "2.0") ++ @Deprecated(since = "1.5") + public GeocentricCRS createGeocentricCRS(String code) throws FactoryException { + return factory().createGeocentricCRS(code); + } + + @Override + public GeodeticCRS createGeodeticCRS(String code) throws FactoryException { + return factory().createGeodeticCRS(code); + } + + @Override + @Deprecated(since = "1.5") + public ImageCRS createImageCRS(String code) throws FactoryException { + return factory().createImageCRS(code); + } + @Override public ProjectedCRS createProjectedCRS(String code) throws FactoryException { return factory().createProjectedCRS(code); diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/privy/WKTKeywords.java index f2d6f8561a,35cf70a5ec..b9ea8c0544 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/privy/WKTKeywords.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/privy/WKTKeywords.java @@@ -234,10 -234,10 +234,11 @@@ public final class WKTKeywords extends private static final Map<Class<?>,String[]> TYPES = new HashMap<>(30); static { /* - * `SingleCRS` subtypes. The `GeodeticCRS` is a common parent of - * `GeographicCRS` and `GeocentricCRS`, repeated for both of them. + * `SingleCRS` subtypes. The `GeographicCRS` and `GeocentricCRS` types are handled separately + * because they are implied by the `GeodeticCRS` type in the `subtypes` array, so they do not + * need to be repeated there. */ + addType(org.opengis.referencing.crs.GeocentricCRS.class, GeodeticCRS, GeodCRS, GeocCS); addType(org.opengis.referencing.crs.GeographicCRS.class, GeodeticCRS, GeodCRS, GeogCS); String[][] subtypes; subtypes = new String[][] { diff --cc geoapi/snapshot index b03ead17de,62db019354..4da2243ded --- a/geoapi/snapshot +++ b/geoapi/snapshot @@@ -1,1 -1,1 +1,1 @@@ - Subproject commit b03ead17de5dc8672a45579b128590dd3554bad8 -Subproject commit 62db019354dc62d805b877c4b37227ed68ed0a7c ++Subproject commit 4da2243dedd6c1cbd51e811fe937750314fa7e1d