(sis) 02/02: Merge branch 'geoapi-3.1', but without the assumption that `ProjectedCRS` extends `DerivedCRS`. IT means that `GeneralDerivedCRS` needs to be used more often than on the `geoapi-3.1` bran
This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/sis.git commit 161a5fe3c8e79997b5b64d566067fd359a0e241b Merge: 39df6c6024 20ded9bfa1 Author: Martin Desruisseaux AuthorDate: Tue Apr 16 16:37:44 2024 +0200 Merge branch 'geoapi-3.1', but without the assumption that `ProjectedCRS` extends `DerivedCRS`. IT means that `GeneralDerivedCRS` needs to be used more often than on the `geoapi-3.1` branch. .../apache/sis/io/wkt/GeodeticObjectParser.java| 2 +- .../org/apache/sis/io/wkt/MathTransformParser.java | 2 +- .../main/org/apache/sis/io/wkt/WKTFormat.java | 4 ++-- .../main/org/apache/sis/referencing/CRS.java | 4 ++-- .../sis/referencing/crs/DefaultDerivedCRS.java | 5 ++--- .../referencing/datum/DefaultVerticalDatum.java| 1 - .../referencing/factory/sql/AuthorityCodes.java| 10 + .../referencing/factory/sql/EPSGCodeFinder.java| 2 +- .../sis/referencing/factory/sql/TableInfo.java | 24 +- .../operation/CoordinateOperationFinder.java | 12 +-- .../operation/transform/ConcatenatedTransform.java | 2 +- 11 files changed, 45 insertions(+), 23 deletions(-) diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultVerticalDatum.java index 96e209538a,e0a3a531aa..4f911e51e5 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultVerticalDatum.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultVerticalDatum.java @@@ -18,7 -18,7 +18,6 @@@ package org.apache.sis.referencing.datu import java.util.Map; import java.util.Objects; --import java.util.Optional; import jakarta.xml.bind.annotation.XmlType; import jakarta.xml.bind.annotation.XmlElement; import jakarta.xml.bind.annotation.XmlRootElement; diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/sql/TableInfo.java index 1682f75053,906f1e94a6..12e1769ed8 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/sql/TableInfo.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/sql/TableInfo.java @@@ -254,6 -251,28 +255,27 @@@ final class TableInfo return CharSequences.isAcronymForWords(name, expected); } + /** + * Appends a {@code WHERE} clause together with a condition for searching the specified object. + * This method delegates to {@link #where(Class, StringBuilder)} with the type of the given object, + * except that some object properties may be inspected for resolving ambiguities. + * + * @param object the object to search in the database. + * @param buffer where to append the {@code WHERE} clause. + */ -@SuppressWarnings("deprecation") + final void where(final IdentifiedObject object, final StringBuilder buffer) { + Class userType = object.getClass(); + if (object instanceof GeodeticCRS) { + final CoordinateSystem cs = ((GeodeticCRS) object).getCoordinateSystem(); + if (cs instanceof EllipsoidalCS) { + userType = GeographicCRS.class; + } else if (cs instanceof CartesianCS || cs instanceof SphericalCS) { + userType = GeocentricCRS.class; + } + } + where(userType, buffer); + } + /** * Appends a {@code WHERE} clause together with a condition for searching the most specific subtype, * if such condition can be added. The clause appended by this method looks like the following example diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/CoordinateOperationFinder.java index 91d78cbf25,82eeff00dc..35f9d4d476 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/CoordinateOperationFinder.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/CoordinateOperationFinder.java @@@ -367,13 -368,13 +367,13 @@@ public class CoordinateOperationFinder /** * Creates operations from an arbitrary single CRS to a derived coordinate reference system. * Conversions from {@code GeographicCRS} to {@code ProjectedCRS} are also handled by this method, - * since projected CRS are a special kind of {@code DerivedCRS}. + * since projected CRS are a special kind of {@code GeneralDerivedCRS}. * * The default implementation constructs the following operation chain: - * sourceCRS → {@linkplain GeneralDerivedCRS#getBaseCRS() baseCRS} → targetCRS + * sourceCRS → {@linkplain DerivedCRS#getBaseCRS() baseCRS} → targetCRS * * where the conversion from {@code baseCRS} to {@code targetCRS} is obtained from - * targetCRS.{@linkplain
(sis) branch main updated (00b4a72d2f -> 161a5fe3c8)
This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/sis.git from 00b4a72d2f Merge branch 'geoapi-3.1': reduce usage of `GeocentricCRS`, to be deprecated in GeoAPI 3.1. This merge skips the replacement of `createGeocentricCRS(…)` by `createGeodeticCRS(…)` because the GeoAPI 3.0 factory interfaces does not have the latter methods. new 39df6c6024 Add warnings about `GeodeticCRS` type that may be replaced by `GeodeticCRS` type in a future version. add d9303f1d7d Temporarily use "2.0" as the version number for methods that are deprecated in the `geoapi-3.1` branch but not yet on main. add 6fd7c530f7 Use the SIS-specific `DefaultGeocentricCRS` class in one place where we removed the `GeocentricCRS` interface. This is needed for avoiding an ambiguity when searching codes in an EPSG database. add 6c50bd371c Update for the removal of `GeneralDerivedCRS` from GeoAPI 4.0. This is replaced by direct usage of `DerivedCRS`. add 20ded9bfa1 Merge branch 'geoapi-4.0' into geoapi-3.1, but keep checking for `GeneralDerivedCRS` in `instanceof` checks. new 161a5fe3c8 Merge branch 'geoapi-3.1', but without the assumption that `ProjectedCRS` extends `DerivedCRS`. IT means that `GeneralDerivedCRS` needs to be used more often than on the `geoapi-3.1` branch. The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../apache/sis/io/wkt/GeodeticObjectParser.java| 2 +- .../org/apache/sis/io/wkt/MathTransformParser.java | 2 +- .../main/org/apache/sis/io/wkt/WKTFormat.java | 4 ++-- .../main/org/apache/sis/referencing/CRS.java | 4 ++-- .../sis/referencing/crs/DefaultDerivedCRS.java | 5 ++--- .../referencing/datum/DefaultVerticalDatum.java| 1 - .../factory/ConcurrentAuthorityFactory.java| 4 .../factory/GeodeticAuthorityFactory.java | 4 .../referencing/factory/GeodeticObjectFactory.java | 8 .../factory/MultiAuthoritiesFactory.java | 4 .../referencing/factory/sql/AuthorityCodes.java| 10 + .../referencing/factory/sql/EPSGCodeFinder.java| 2 +- .../sis/referencing/factory/sql/TableInfo.java | 24 +- .../operation/CoordinateOperationFinder.java | 12 +-- .../operation/transform/ConcatenatedTransform.java | 2 +- 15 files changed, 65 insertions(+), 23 deletions(-)
(sis) 01/02: Add warnings about `GeodeticCRS` type that may be replaced by `GeodeticCRS` type in a future version.
This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/sis.git commit 39df6c6024da0ad136d1f1cebb39aaff8d501727 Author: Martin Desruisseaux AuthorDate: Tue Apr 16 13:59:09 2024 +0200 Add warnings about `GeodeticCRS` type that may be replaced by `GeodeticCRS` type in a future version. --- .../sis/referencing/factory/ConcurrentAuthorityFactory.java | 4 .../apache/sis/referencing/factory/GeodeticAuthorityFactory.java | 4 .../org/apache/sis/referencing/factory/GeodeticObjectFactory.java | 8 .../apache/sis/referencing/factory/MultiAuthoritiesFactory.java | 4 4 files changed, 20 insertions(+) diff --git 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 index 2688f607cd..63527e9e79 100644 --- 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 @@ -935,6 +935,10 @@ public abstract class ConcurrentAuthorityFactory * * + * Warning: In a future SIS version, the return type may be changed to the + * {@link GeodeticCRS} parent interface. This is because ISO 19111 does not defines specific interface + * for the geocentric case. Users should assign the return value to a {@code GeodeticCRS} type. + * * @return the coordinate reference system for the given code. * @throws FactoryException if the object creation failed. */ diff --git 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 index a5d86d0ee3..db8b1d7f60 100644 --- 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 @@ -344,6 +344,10 @@ public abstract class GeodeticAuthorityFactory extends AbstractFactory implement * EPSG:4984 World Geodetic System 1972 * * + * Warning: In a future SIS version, the return type may be changed to the + * {@link GeodeticCRS} parent interface. This is because ISO 19111 does not defines specific interface + * for the geocentric case. Users should assign the return value to a {@code GeodeticCRS} type. + * * Default implementation * The default implementation delegates to {@link #createCoordinateReferenceSystem(String)} and casts the result. * If the result cannot be casted, then a {@link NoSuchAuthorityCodeException} is thrown. 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 771df2dd98..7c8d8f2d31 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 @@ -320,6 +320,10 @@ public class GeodeticObjectFactory extends AbstractFactory implements CRSFactory * An {@linkplain #createGeocentricCRS(Map, GeodeticDatum, SphericalCS) alternate method} allows creation of the * same kind of CRS with spherical coordinate system instead of a Cartesian one. * + * Warning: In a future SIS version, the return type may be changed to the + * {@link GeodeticCRS} parent interface. This is because ISO 19111 does not defines specific interface + * for the geocentric case. Users should assign the return value to a {@code GeodeticCRS} type. + * * Dependencies * The components needed by this method can be created by the following methods: * @@ -398,6 +402,10 @@ public class GeodeticObjectFactory extends AbstractFactory implements CRSFactory * An {@linkplain #createGeocentricCRS(Map, GeodeticDatum, CartesianCS) alternate method} allows creation of the * same kind of CRS with Cartesian coordinate system instead of a spherical one. * + * Warning: In a future SIS version, the return type may be changed to the + * {@link GeodeticCRS} parent interface. This is because ISO 19111 does not defines specific interface + * for the geocentric case. Users should assign the return value to a {@code GeodeticCRS} type. + * * Dependencies * The components needed by this method can be created by the following methods: * diff --git
(sis) branch geoapi-3.1 updated (d9303f1d7d -> 20ded9bfa1)
This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a change to branch geoapi-3.1 in repository https://gitbox.apache.org/repos/asf/sis.git from d9303f1d7d Temporarily use "2.0" as the version number for methods that are deprecated in the `geoapi-3.1` branch but not yet on main. add 6fd7c530f7 Use the SIS-specific `DefaultGeocentricCRS` class in one place where we removed the `GeocentricCRS` interface. This is needed for avoiding an ambiguity when searching codes in an EPSG database. add 6c50bd371c Update for the removal of `GeneralDerivedCRS` from GeoAPI 4.0. This is replaced by direct usage of `DerivedCRS`. new 20ded9bfa1 Merge branch 'geoapi-4.0' into geoapi-3.1, but keep checking for `GeneralDerivedCRS` in `instanceof` checks. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../org/apache/sis/buildtools/book/GEOAPI.lst | 1 - .../geometry/wrapper/SpatialOperationContext.java | 2 ++ .../apache/sis/io/wkt/GeodeticObjectParser.java| 2 +- .../org/apache/sis/io/wkt/MathTransformParser.java | 2 +- .../main/org/apache/sis/io/wkt/WKTFormat.java | 4 ++-- .../main/org/apache/sis/referencing/CRS.java | 7 +++--- .../sis/referencing/crs/AbstractDerivedCRS.java| 1 + .../sis/referencing/crs/DefaultDerivedCRS.java | 5 ++--- .../referencing/datum/DefaultPrimeMeridian.java| 1 + .../referencing/factory/AuthorityFactoryProxy.java | 1 + .../factory/MultiAuthoritiesFactory.java | 4 +++- .../referencing/factory/sql/AuthorityCodes.java| 10 + .../factory/sql/CoordinateOperationSet.java| 1 + .../referencing/factory/sql/EPSGCodeFinder.java| 2 +- .../sis/referencing/factory/sql/TableInfo.java | 25 +- .../operation/AbstractCoordinateOperation.java | 11 +- .../operation/CoordinateOperationFinder.java | 21 +++--- .../operation/DefaultOperationMethod.java | 1 + .../referencing/operation/SubOperationInfo.java| 1 + .../operation/transform/ConcatenatedTransform.java | 2 +- .../referencing/privy/CoordinateOperations.java| 1 + .../sis/referencing/privy/DefinitionVerifier.java | 1 + .../report/CoordinateOperationMethods.java | 6 +++--- .../report/CoordinateReferenceSystems.java | 5 ++--- .../integration/CoordinateReferenceSystemTest.java | 5 ++--- geoapi/snapshot| 2 +- .../src/org.apache.sis.gui/bundle/conf/imports.jsh | 1 - 27 files changed, 82 insertions(+), 43 deletions(-)
(sis) 01/01: Merge branch 'geoapi-4.0' into geoapi-3.1, but keep checking for `GeneralDerivedCRS` in `instanceof` checks.
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 20ded9bfa17d1c1217c96f5bb3a897bbc25d535b Merge: d9303f1d7d 6c50bd371c Author: Martin Desruisseaux AuthorDate: Tue Apr 16 15:36:18 2024 +0200 Merge branch 'geoapi-4.0' into geoapi-3.1, but keep checking for `GeneralDerivedCRS` in `instanceof` checks. .../org/apache/sis/buildtools/book/GEOAPI.lst | 1 - .../geometry/wrapper/SpatialOperationContext.java | 2 ++ .../apache/sis/io/wkt/GeodeticObjectParser.java| 2 +- .../org/apache/sis/io/wkt/MathTransformParser.java | 2 +- .../main/org/apache/sis/io/wkt/WKTFormat.java | 4 ++-- .../main/org/apache/sis/referencing/CRS.java | 7 +++--- .../sis/referencing/crs/AbstractDerivedCRS.java| 1 + .../sis/referencing/crs/DefaultDerivedCRS.java | 5 ++--- .../referencing/datum/DefaultPrimeMeridian.java| 1 + .../referencing/factory/AuthorityFactoryProxy.java | 1 + .../factory/MultiAuthoritiesFactory.java | 4 +++- .../referencing/factory/sql/AuthorityCodes.java| 10 + .../factory/sql/CoordinateOperationSet.java| 1 + .../referencing/factory/sql/EPSGCodeFinder.java| 2 +- .../sis/referencing/factory/sql/TableInfo.java | 25 +- .../operation/AbstractCoordinateOperation.java | 11 +- .../operation/CoordinateOperationFinder.java | 21 +++--- .../operation/DefaultOperationMethod.java | 1 + .../referencing/operation/SubOperationInfo.java| 1 + .../operation/transform/ConcatenatedTransform.java | 2 +- .../referencing/privy/CoordinateOperations.java| 1 + .../sis/referencing/privy/DefinitionVerifier.java | 1 + .../report/CoordinateOperationMethods.java | 6 +++--- .../report/CoordinateReferenceSystems.java | 5 ++--- .../integration/CoordinateReferenceSystemTest.java | 5 ++--- geoapi/snapshot| 2 +- .../src/org.apache.sis.gui/bundle/conf/imports.jsh | 1 - 27 files changed, 82 insertions(+), 43 deletions(-) diff --cc endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/SpatialOperationContext.java index 871ce7619b,c372eff258..ed14df684c --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/SpatialOperationContext.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/SpatialOperationContext.java @@@ -304,6 -304,6 +304,7 @@@ select: if (commonCRS == null) * @throws TransformException if a coordinate conversion was required but failed. * @throws IncommensurableException if a coordinate system does not use the expected units. */ ++@SuppressWarnings("deprecation") private static CoordinateReferenceSystem usingSystemUnit(final GeometryWrapper geometry, final CoordinateReferenceSystem geometryCRS, CoordinateReferenceSystem targetCRS, @@@ -372,6 -372,6 +373,7 @@@ * @throws TransformException if a coordinate conversion was required but failed. * @throws IncommensurableException if a coordinate system does not use the expected units. */ ++@SuppressWarnings("deprecation") ProjectedCRS create(final GeographicCRS baseCRS, DirectPosition centroid, CoordinateReferenceSystem geometryCRS) throws FactoryException, TransformException, IncommensurableException { diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/GeodeticObjectParser.java index 5ce1cc255d,4fb5f64603..d6ab6fa8cf --- 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 @@@ -1714,8 -1708,8 +1714,8 @@@ class GeodeticObjectParser extends Math * @param parent the parent element. * @param dimension the minimal number of dimensions (usually 2). * @param csType the default coordinate system type, or {@code null} if unknown. - *Should be non-null only when parsing a {@link GeneralDerivedCRS#getBaseCRS()} component. + *Should be non-null only when parsing a {@link DerivedCRS#getBaseCRS()} component. - * @return the {@code "GeodeticCRS"} element as a {@link GeographicCRS} or {@link GeodeticCRS} object. + * @return the {@code "GeodeticCRS"} element as a {@link GeographicCRS} or {@link GeocentricCRS} object. * @throws ParseException if the {@code "GeodeticCRS"} element cannot be parsed. * * @see org.apache.sis.referencing.crs.DefaultGeographicCRS#formatTo(Formatter) diff --cc
(sis) branch geoapi-4.0 updated: Update for the removal of `GeneralDerivedCRS` from GeoAPI 4.0. This is replaced by direct usage of `DerivedCRS`.
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 6c50bd371c Update for the removal of `GeneralDerivedCRS` from GeoAPI 4.0. This is replaced by direct usage of `DerivedCRS`. 6c50bd371c is described below commit 6c50bd371c210bb3ee28525f9abe0f2ad59de146 Author: Martin Desruisseaux AuthorDate: Tue Apr 16 14:42:06 2024 +0200 Update for the removal of `GeneralDerivedCRS` from GeoAPI 4.0. This is replaced by direct usage of `DerivedCRS`. --- .../org/apache/sis/buildtools/book/GEOAPI.lst | 1 - .../geometry/wrapper/SpatialOperationContext.java | 10 +++ .../apache/sis/io/wkt/GeodeticObjectParser.java| 2 +- .../org/apache/sis/io/wkt/MathTransformParser.java | 2 +- .../main/org/apache/sis/io/wkt/WKTFormat.java | 4 +-- .../main/org/apache/sis/referencing/CRS.java | 12 .../apache/sis/referencing/crs/AbstractCRS.java| 7 ++--- .../sis/referencing/crs/AbstractDerivedCRS.java| 12 .../sis/referencing/crs/DefaultDerivedCRS.java | 5 ++-- .../referencing/datum/DefaultPrimeMeridian.java| 4 +-- .../referencing/factory/AuthorityFactoryProxy.java | 2 +- .../factory/MultiAuthoritiesFactory.java | 2 +- .../factory/sql/CoordinateOperationSet.java| 6 ++-- .../referencing/factory/sql/EPSGCodeFinder.java| 6 ++-- .../operation/AbstractCoordinateOperation.java | 19 ++-- .../operation/CoordinateOperationFinder.java | 34 +++--- .../operation/CoordinateOperationRegistry.java | 5 ++-- .../referencing/operation/DefaultConversion.java | 8 ++--- .../operation/DefaultOperationMethod.java | 6 ++-- .../referencing/operation/SubOperationInfo.java| 4 +-- .../operation/transform/ConcatenatedTransform.java | 2 +- .../referencing/privy/CoordinateOperations.java| 6 ++-- .../sis/referencing/privy/DefinitionVerifier.java | 8 ++--- .../referencing/privy/ReferencingUtilities.java| 5 ++-- .../report/CoordinateOperationMethods.java | 6 ++-- .../report/CoordinateReferenceSystems.java | 5 ++-- .../integration/CoordinateReferenceSystemTest.java | 5 ++-- geoapi/snapshot| 2 +- .../src/org.apache.sis.gui/bundle/conf/imports.jsh | 1 - .../org/apache/sis/gui/referencing/CRSChooser.java | 7 ++--- 30 files changed, 93 insertions(+), 105 deletions(-) diff --git a/buildSrc/src/main/resources/org/apache/sis/buildtools/book/GEOAPI.lst b/buildSrc/src/main/resources/org/apache/sis/buildtools/book/GEOAPI.lst index dfea7437fb..ca0059bed2 100644 --- a/buildSrc/src/main/resources/org/apache/sis/buildtools/book/GEOAPI.lst +++ b/buildSrc/src/main/resources/org/apache/sis/buildtools/book/GEOAPI.lst @@ -79,7 +79,6 @@ FormatConsistency Formula GCP GCPCollection -GeneralDerivedCRS GeneralParameterDescriptor GeneralParameterValue GeodeticCRS diff --git a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/SpatialOperationContext.java b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/SpatialOperationContext.java index 871ce7619b..c372eff258 100644 --- a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/SpatialOperationContext.java +++ b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/SpatialOperationContext.java @@ -30,7 +30,7 @@ import org.opengis.referencing.cs.CoordinateSystem; import org.opengis.referencing.cs.CoordinateSystemAxis; import org.opengis.referencing.crs.ProjectedCRS; import org.opengis.referencing.crs.GeographicCRS; -import org.opengis.referencing.crs.GeneralDerivedCRS; +import org.opengis.referencing.crs.DerivedCRS; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.operation.OperationMethod; import org.opengis.referencing.operation.TransformException; @@ -319,8 +319,8 @@ select: if (commonCRS == null) { if (Units.isLinear(systemUnit) && targetCRS instanceof GeographicCRS) { return Projector.instance().create((GeographicCRS) targetCRS, geometry.getCentroid(), geometryCRS); } -if (targetCRS instanceof GeneralDerivedCRS) { -targetCRS = ((GeneralDerivedCRS) targetCRS).getBaseCRS(); +if (targetCRS instanceof DerivedCRS) { +targetCRS = ((DerivedCRS) targetCRS).getBaseCRS(); } else { throw new IncommensurableException(Errors.format(Errors.Keys.InconsistentUnitsForCS_1, systemUnit)); } @@ -381,8 +381,8 @@ select: if (commonCRS == null) { * Note that a CRS can be both derived and geographic, so we need to do this check first in order to * avoid derived geographic CRS such as the ones
(sis) branch geoapi-3.1 updated: Temporarily use "2.0" as the version number for methods that are deprecated in the `geoapi-3.1` branch but not yet on main.
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 The following commit(s) were added to refs/heads/geoapi-3.1 by this push: new d9303f1d7d Temporarily use "2.0" as the version number for methods that are deprecated in the `geoapi-3.1` branch but not yet on main. d9303f1d7d is described below commit d9303f1d7d9a1126f0c7c7ff4bec383a60d2574b Author: Martin Desruisseaux AuthorDate: Tue Apr 16 13:08:39 2024 +0200 Temporarily use "2.0" as the version number for methods that are deprecated in the `geoapi-3.1` branch but not yet on main. --- .../main/org/apache/sis/referencing/datum/DefaultVerticalDatum.java | 4 ++-- .../org/apache/sis/referencing/factory/AuthorityFactoryProxy.java | 4 +++- .../apache/sis/referencing/factory/ConcurrentAuthorityFactory.java | 2 +- .../apache/sis/referencing/factory/GeodeticAuthorityFactory.java| 2 +- .../org/apache/sis/referencing/factory/GeodeticObjectFactory.java | 6 +++--- .../org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java | 2 +- .../org/apache/sis/referencing/internal/EPSGFactoryProxyCRS.java| 2 +- 7 files changed, 12 insertions(+), 10 deletions(-) diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultVerticalDatum.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultVerticalDatum.java index f7584808d6..e0a3a531aa 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultVerticalDatum.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultVerticalDatum.java @@ -168,7 +168,7 @@ public class DefaultVerticalDatum extends AbstractDatum implements VerticalDatum * * @deprecated As of ISO 19111:2019, the {@code VerticalDatumType} argument is replaced by {@code RealizationMethod}. */ -@Deprecated(since = "2.0") +@Deprecated(since = "2.0") // Temporary version number until this branch is released. public DefaultVerticalDatum(final Map properties, final VerticalDatumType type) { super(properties); this.type = Objects.requireNonNull(type); @@ -289,7 +289,7 @@ public class DefaultVerticalDatum extends AbstractDatum implements VerticalDatum * @deprecated As of ISO 19111:2019, the {@code VerticalDatumType} argument is replaced by {@code RealizationMethod}. */ @Override -@Deprecated(since = "2.0") +@Deprecated(since = "2.0") // Temporary version number until this branch is released. public VerticalDatumType getVerticalDatumType() { return type(); } diff --git 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 index 2063b996f8..1c2cba8911 100644 --- 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,7 +460,7 @@ abstract class AuthorityFactoryProxy { } }; -@Deprecated(since = "1.5") +@Deprecated(since = "2.0") // Temporary version number until this branch is released. static final AuthorityFactoryProxy GEOCENTRIC_CRS = new AuthorityFactoryProxy(GeocentricCRS.class, AuthorityFactoryIdentifier.CRS) { @Override GeocentricCRS create(GeodeticAuthorityFactory factory, String code) throws FactoryException { @@ -571,6 +571,8 @@ abstract class AuthorityFactoryProxy { static final AuthorityFactoryProxy[] PROXIES = new AuthorityFactoryProxy[] { PROJECTED_CRS, // Special kind of GeneralDerivedCRS. GEOGRAPHIC_CRS, // Special kind of GeodeticCRS. +GEOCENTRIC_CRS, // Special kind of GeodeticCRS. +GEODETIC_CRS, VERTICAL_CRS, TEMPORAL_CRS, IMAGE_CRS, // Can be seen as a special kind of EngineeringCRS (even if not shown in hierarchy). diff --git 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 index d413fc2e81..74351d232d 100644 --- 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 @@ -959,7 +959,7 @@ public abstract class ConcurrentAuthorityFactory properties, final GeodeticDatum datum, final CartesianCS cs) throws FactoryException { @@ -475,7 +475,7 @@ public class GeodeticObjectFactory extends
(sis) branch geoapi-4.0 updated: Use the SIS-specific `DefaultGeocentricCRS` class in one place where we removed the `GeocentricCRS` interface. This is needed for avoiding an ambiguity when searching
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 6fd7c530f7 Use the SIS-specific `DefaultGeocentricCRS` class in one place where we removed the `GeocentricCRS` interface. This is needed for avoiding an ambiguity when searching codes in an EPSG database. 6fd7c530f7 is described below commit 6fd7c530f7d5181b5dd2fc5bb86af2ba2cc73999 Author: Martin Desruisseaux AuthorDate: Tue Apr 16 11:50:09 2024 +0200 Use the SIS-specific `DefaultGeocentricCRS` class in one place where we removed the `GeocentricCRS` interface. This is needed for avoiding an ambiguity when searching codes in an EPSG database. --- .../sis/referencing/crs/DefaultTemporalCRS.java| 1 + .../referencing/factory/AuthorityFactoryProxy.java | 1 + .../factory/ConcurrentAuthorityFactory.java| 2 ++ .../factory/GeodeticAuthorityFactory.java | 2 ++ .../referencing/factory/GeodeticObjectFactory.java | 4 +++ .../factory/MultiAuthoritiesFactory.java | 2 ++ .../referencing/factory/sql/AuthorityCodes.java| 10 --- .../referencing/factory/sql/EPSGCodeFinder.java| 2 +- .../sis/referencing/factory/sql/TableInfo.java | 35 -- 9 files changed, 52 insertions(+), 7 deletions(-) diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultTemporalCRS.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultTemporalCRS.java index 8a55606a48..3644a65a34 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultTemporalCRS.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultTemporalCRS.java @@ -152,6 +152,7 @@ public class DefaultTemporalCRS extends AbstractCRS implements TemporalCRS { * * @see org.apache.sis.referencing.factory.GeodeticObjectFactory#createTemporalCRS(Map, TemporalDatum, TimeCS) */ +@SuppressWarnings("this-escape") public DefaultTemporalCRS(final Map properties, final TemporalDatum datum, final TimeCScs) diff --git 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 index 8947411b87..7893b80b77 100644 --- 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 @@ -543,6 +543,7 @@ abstract class AuthorityFactoryProxy { static final AuthorityFactoryProxy[] PROXIES = new AuthorityFactoryProxy[] { PROJECTED_CRS, // Special kind of GeneralDerivedCRS. GEOGRAPHIC_CRS, // Special kind of GeodeticCRS. +GEODETIC_CRS, VERTICAL_CRS, TEMPORAL_CRS, ENGINEERING_CRS, diff --git 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 index 34e23dddab..f7d6ab7758 100644 --- 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 @@ -937,6 +937,8 @@ public abstract class ConcurrentAuthorityFactory properties, @@ -420,6 +422,8 @@ public class GeodeticObjectFactory extends AbstractFactory implements CRSFactory * * @see DefaultGeocentricCRS#DefaultGeocentricCRS(Map, GeodeticDatum, SphericalCS) * @see GeodeticAuthorityFactory#createGeodeticCRS(String) + * + * @since 1.5 */ @Override public GeodeticCRS createGeodeticCRS(final Map properties, 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 55fe728fb9..0bcfff9048 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 @@ -956,6 +956,8 @@ public class MultiAuthoritiesFactory extends GeodeticAuthorityFactory implements * * @return the coordinate reference system for the given code. * @throws FactoryException if the object creation failed. + * + * @since 1.5 */ @Override public
(sis) branch main updated (2c90ee97ab -> 00b4a72d2f)
This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/sis.git from 2c90ee97ab Merge branch 'geoapi-3.1'. add 247d4bb78e Update for change in GeoAPI 4.0: deprecated `GeocentricCRS` interface is removed. add 798a145e1e 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. new 00b4a72d2f Merge branch 'geoapi-3.1': reduce usage of `GeocentricCRS`, to be deprecated in GeoAPI 3.1. This merge skips the replacement of `createGeocentricCRS(…)` by `createGeodeticCRS(…)` because the GeoAPI 3.0 factory interfaces does not have the latter methods. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../apache/sis/io/wkt/GeodeticObjectParser.java| 3 +- .../main/org/apache/sis/referencing/CommonCRS.java | 8 .../apache/sis/referencing/crs/AbstractCRS.java| 23 ++ .../sis/referencing/crs/DefaultDerivedCRS.java | 51 +- .../sis/referencing/crs/DefaultGeocentricCRS.java | 34 ++- .../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 +++--- .../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 | 2 +- .../org/apache/sis/referencing/CommonCRSTest.java | 6 +-- .../sis/referencing/EPSGFactoryFallbackTest.java | 13 -- .../sis/referencing/crs/DefaultDerivedCRSTest.java | 24 +- .../referencing/factory/AuthorityFactoryMock.java | 4 +- .../factory/MultiAuthoritiesFactoryTest.java | 2 - .../referencing/factory/sql/EPSGFactoryTest.java | 2 +- .../operation/CoordinateOperationFinderTest.java | 4 +- .../sis/referencing/privy/WKTKeywordsTest.java | 4 +- .../sis/storage/geotiff/reader/CRSBuilder.java | 10 ++--- .../apache/sis/storage/netcdf/base/CRSBuilder.java | 4 +- .../org/apache/sis/gui/referencing/CRSChooser.java | 4 +- 30 files changed, 189 insertions(+), 124 deletions(-)
(sis) 01/01: Merge branch 'geoapi-3.1': reduce usage of `GeocentricCRS`, to be deprecated in GeoAPI 3.1. This merge skips the replacement of `createGeocentricCRS(…)` by `createGeodeticCRS(…)` because
This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/sis.git commit 00b4a72d2fe4edc40cb3617e4657b181a1f9f87f Merge: 2c90ee97ab 798a145e1e Author: Martin Desruisseaux AuthorDate: Tue Apr 16 12:51:22 2024 +0200 Merge branch 'geoapi-3.1': reduce usage of `GeocentricCRS`, to be deprecated in GeoAPI 3.1. This merge skips the replacement of `createGeocentricCRS(…)` by `createGeodeticCRS(…)` because the GeoAPI 3.0 factory interfaces does not have the latter methods. .../apache/sis/io/wkt/GeodeticObjectParser.java| 3 +- .../main/org/apache/sis/referencing/CommonCRS.java | 8 .../apache/sis/referencing/crs/AbstractCRS.java| 23 ++ .../sis/referencing/crs/DefaultDerivedCRS.java | 51 +- .../sis/referencing/crs/DefaultGeocentricCRS.java | 34 ++- .../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 +++--- .../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 | 2 +- .../org/apache/sis/referencing/CommonCRSTest.java | 6 +-- .../sis/referencing/EPSGFactoryFallbackTest.java | 13 -- .../sis/referencing/crs/DefaultDerivedCRSTest.java | 24 +- .../referencing/factory/AuthorityFactoryMock.java | 4 +- .../factory/MultiAuthoritiesFactoryTest.java | 2 - .../referencing/factory/sql/EPSGFactoryTest.java | 2 +- .../operation/CoordinateOperationFinderTest.java | 4 +- .../sis/referencing/privy/WKTKeywordsTest.java | 4 +- .../sis/storage/geotiff/reader/CRSBuilder.java | 10 ++--- .../apache/sis/storage/netcdf/base/CRSBuilder.java | 4 +- .../org/apache/sis/gui/referencing/CRSChooser.java | 4 +- 30 files changed, 189 insertions(+), 124 deletions(-) diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/CommonCRS.java index b49766e6f0,0a436f01a3..622d9c2836 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/CommonCRS.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/CommonCRS.java @@@ -741,6 -740,6 +741,10 @@@ public enum CommonCRS * WGS 84 {@link #WGS84} 4978 * * ++ * Warning: In a future SIS version, the return type may be changed to the ++ * {@link GeodeticCRS} parent interface. This is because ISO 19111 does not defines specific interface ++ * for the geocentric case. Users should assign the return value to a {@code GeodeticCRS} type. ++ * * @return the geocentric CRS associated to this enum. * * @see CRS#forCode(String) @@@ -793,6 -792,6 +797,10 @@@ * Geocentric radius in metres oriented toward {@linkplain AxisDirection#UP up}. * * ++ * Warning: In a future SIS version, the return type may be changed to the ++ * {@link GeodeticCRS} parent interface. This is because ISO 19111 does not defines specific interface ++ * for the geocentric case. Users should assign the return value to a {@code GeodeticCRS} type. ++ * * @return the geocentric CRS associated to this enum. * * @see DefaultGeocentricCRS diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultDerivedCRS.java index 2606e972ce,6a01107efb..9f17303c75 --- 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 @@@ -57,10 -58,13 +58,11 @@@ import static org.apache.sis.referencin import org.apache.sis.io.wkt.Convention; import org.apache.sis.io.wkt.Formatter; import org.apache.sis.util.ComparisonMode; + import org.apache.sis.util.collection.Containers; -// Specific to the geoapi-3.1 and geoapi-4.0 branches: -import org.opengis.referencing.datum.DatumEnsemble; -import org.opengis.referencing.datum.ParametricDatum; -import org.opengis.referencing.crs.ParametricCRS; -import org.opengis.referencing.cs.ParametricCS; +// Specific to the main branch: +import org.apache.sis.referencing.cs.DefaultParametricCS; +import org.apache.sis.referencing.datum.DefaultParametricDatum;