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 a1e3ecb82cb7ff9b392c4318bfee2ad6e8f0b344 Merge: 789cd85c1a f4ee01f6fe Author: Martin Desruisseaux <martin.desruisse...@geomatys.com> AuthorDate: Fri Sep 5 13:58:31 2025 +0200 Merge branch 'geoapi-4.0' into geoapi-3.1. Contains the last bug fixes for allowing JUnit tests to pass with EPSG version 12. NOTICE | 2 +- README.md | 2 +- .../apache/sis/console/MetadataCommandTest.java | 3 +- .../iso/extent/DefaultGeographicDescription.java | 2 +- .../sis/referencing/AbstractIdentifiedObject.java | 13 +- .../sis/referencing/StandardDefinitions.java | 25 ++- .../sis/referencing/cs/CoordinateSystems.java | 3 + .../sis/referencing/datum/DatumOrEnsemble.java | 17 +- .../referencing/datum/DefaultGeodeticDatum.java | 2 + .../referencing/factory/GeodeticObjectFactory.java | 5 + .../internal/PositionalAccuracyConstant.java | 11 - .../apache/sis/referencing/internal/Resources.java | 10 +- .../sis/referencing/internal/Resources.properties | 2 +- .../referencing/internal/Resources_fr.properties | 2 +- .../apache/sis/referencing/operation/CRSPair.java | 2 +- .../operation/CoordinateOperationFinder.java | 244 +++++++++++++++------ .../operation/CoordinateOperationRegistry.java | 108 +++++---- .../sis/referencing/operation/matrix/Matrix1.java | 17 +- .../sis/referencing/operation/matrix/Matrix2.java | 16 +- .../CoordinateSystemTransformBuilder.java | 3 +- .../operation/CoordinateOperationFinderTest.java | 10 +- .../DefaultCoordinateOperationFactoryTest.java | 2 +- .../apache/sis/setup/OptionalInstallations.java | 4 +- .../org/apache/sis/util/resources/Vocabulary.java | 15 +- .../sis/util/resources/Vocabulary.properties | 3 +- .../sis/util/resources/Vocabulary_fr.properties | 3 +- netbeans-project/ivy-settings.xml | 2 +- optional/build.gradle.kts | 3 + optional/src/org.apache.sis.gui/bundle/README | 8 +- .../sis/referencing/factory/sql/epsg/README.md | 4 +- parent/pom.xml | 2 +- settings.gradle.kts | 4 +- 32 files changed, 366 insertions(+), 183 deletions(-) diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/AbstractIdentifiedObject.java index 20250ab122,4237b39dc9..15739e97e9 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/AbstractIdentifiedObject.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/AbstractIdentifiedObject.java @@@ -74,9 -74,6 +74,11 @@@ import static org.apache.sis.util.privy import static org.apache.sis.util.privy.CollectionsExt.nonEmpty; import static org.apache.sis.util.privy.CollectionsExt.immutableSet; +// Specific to the main and geoapi-3.1 branches: +import org.opengis.referencing.ReferenceIdentifier; ++import org.opengis.referencing.operation.Conversion; ++import org.opengis.referencing.operation.Projection; + // Specific to the geoapi-3.1 and geoapi-4.0 branches: import org.opengis.referencing.ObjectDomain; @@@ -800,9 -797,9 +802,16 @@@ public class AbstractIdentifiedObject e * Returns {@code true} if the given object implements the same GeoAPI interface as this object. */ private boolean implementsSameInterface(final Object object) { -- final Class<? extends IdentifiedObject> type = getInterface(); ++ Class<? extends IdentifiedObject> type = getInterface(); ++ if (Projection.class.isAssignableFrom(type)) { // Deprecated interface, behave as if it does not exist. ++ type = Conversion.class; ++ } if (object instanceof AbstractIdentifiedObject) { -- return ((AbstractIdentifiedObject) object).getInterface() == type; ++ Class<?> other = ((AbstractIdentifiedObject) object).getInterface(); ++ if (Projection.class.isAssignableFrom(other)) { ++ other = Conversion.class; ++ } ++ return other == type; } /* * Fallback for non-SIS implementations. diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/CoordinateOperationFinder.java index 2fc63352b1,77bf446a4b..8378f742fb --- 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 @@@ -1055,13 -1127,16 +1151,16 @@@ public class CoordinateOperationFinder if (isAxisChange1 && mt1.getSourceDimensions() == mt1.getTargetDimensions()) main = step2; if (isAxisChange2 && mt2.getSourceDimensions() == mt2.getTargetDimensions()) main = step1; } - if (main instanceof SingleOperation) { + if (SubTypes.isSingleOperation(main)) { final SingleOperation op = (SingleOperation) main; - final MathTransform mt = factorySIS.getMathTransformFactory().createConcatenatedTransform(mt1, mt2); - main = createFromMathTransform(new HashMap<>(IdentifiedObjects.getProperties(main)), - sourceCRS, targetCRS, mt, op.getMethod(), op.getParameterValues(), - (main instanceof Transformation) ? Transformation.class : - (main instanceof Conversion) ? Conversion.class : SingleOperation.class); + main = createFromMathTransform( + new HashMap<>(IdentifiedObjects.getProperties(main)), + sourceCRS, + targetCRS, + factorySIS.getMathTransformFactory().createConcatenatedTransform(mt1, mt2), + op.getMethod(), + op.getParameterValues(), + typeOf(op)); } else { main = factory.createConcatenatedOperation(defaultName(sourceCRS, targetCRS), step1, step2); }