You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2025/09/11 10:45:23 UTC
(sis) branch geoapi-3.1 updated (11f6114609 -> 14ecaa6557)
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 11f6114609 Merge branch 'geoapi-4.0' into geoapi-3.1. This merge complete the upgrade of the CRS part of WKT 2 to ISO 19162:2019, except for a some advanced elements such as `GeoidModel` and `Calendar[…]`. This commit does not include the upgrade for the coordinate operation part.
add a0c8157ef6 Remove the hack which were added for testing SIS with EPSG 9 or 12. Even if SIS should still be compatible with EPSG 9, the tests now assume EPSG 12.
add 17ef3cb68e WKT 2 consolidation: * Support the `CoordinateMetadata` and `Version` elements. * Make `ConcatenatedOperation` formatting compliant with the standard. * Reorganize the list of keywords by alphabetical order for easier maintenance.
add 85dd6fbbf2 Fix wrong formatting of concatenated operation, and add parsing support.
add cb9d0cfae4 Adjust the operation method providers for changes in EPSG database.
add 38a53c45ac Fix parameter aliases for making them compliant with EPSG definitions.
new 14ecaa6557 Merge branch 'geoapi-4.0' into geoapi-3.1. Contains bug fixes.
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/console/FormattedOutputCommand.java | 2 +-
.../org/apache/sis/console/TransformCommand.java | 4 +-
.../org/apache/sis/console/CRSCommandTest.java | 13 +
.../sis/coverage/grid/ClippedGridCoverageTest.java | 2 +-
.../org/apache/sis/xml/bind/lan/PT_FreeText.java | 2 +-
.../sis/metadata/xml/SchemaComplianceTest.java | 4 +-
.../sis/openoffice/ReferencingFunctions.java | 14 +-
.../sis/openoffice/ReferencingFunctionsTest.java | 8 +-
.../apache/sis/io/wkt/GeodeticObjectParser.java | 176 +++++++++-----
.../referencing/datum/DefaultDatumEnsemble.java | 15 ++
.../referencing/factory/AuthorityFactoryProxy.java | 33 ++-
.../factory/ConcurrentAuthorityFactory.java | 5 +-
.../factory/MultiAuthoritiesFactory.java | 2 +-
.../referencing/factory/sql/EPSGDataAccess.java | 12 +-
.../operation/AbstractCoordinateOperation.java | 58 ++---
.../operation/DefaultConcatenatedOperation.java | 43 +++-
.../DefaultCoordinateOperationFactory.java | 40 ++-
.../referencing/operation/projection/Mercator.java | 11 +-
.../operation/provider/AbstractLambert.java | 2 +
.../operation/provider/AbstractMercator.java | 2 +
.../operation/provider/AbstractStereographic.java | 2 +
.../operation/provider/AxisOrderReversal.java | 4 +-
.../operation/provider/AxisOrderReversal3D.java | 4 +-
.../operation/provider/CassiniSoldner.java | 4 +
.../operation/provider/Equirectangular.java | 10 +-
.../provider/FranceGeocentricInterpolation.java | 6 +-
.../operation/provider/GeocentricAffine.java | 31 ++-
.../operation/provider/GeocentricTranslation.java | 1 +
.../provider/GeographicAndVerticalOffsets.java | 5 +-
.../operation/provider/GeographicOffsets.java | 3 +-
.../provider/LambertAzimuthalEqualArea.java | 4 +
.../operation/provider/LambertConformal1SP.java | 3 +
.../operation/provider/LambertConformal2SP.java | 8 +-
.../provider/LambertConformalMichigan.java | 4 +-
.../operation/provider/LambertConformalWest.java | 1 +
.../provider/LambertCylindricalEqualArea.java | 4 +
.../operation/provider/MapProjection.java | 16 +-
.../operation/provider/Mercator1SP.java | 2 +
.../provider/ModifiedAzimuthalEquidistant.java | 4 +
.../referencing/operation/provider/Mollweide.java | 2 +-
.../operation/provider/ObliqueMercator.java | 2 +
.../operation/provider/ObliqueStereographic.java | 2 +
.../operation/provider/Orthographic.java | 4 +
.../operation/provider/PolarStereographicA.java | 2 +
.../referencing/operation/provider/Polyconic.java | 4 +
.../operation/provider/RegionalMercator.java | 36 ++-
.../operation/provider/TransverseMercator.java | 2 +
.../provider/ZonedTransverseMercator.java | 2 +
.../apache/sis/referencing/privy/WKTKeywords.java | 267 ++++++++-------------
.../sis/io/wkt/GeodeticObjectParserTest.java | 7 +-
.../org/apache/sis/referencing/Assertions.java | 67 +-----
.../org/apache/sis/referencing/CommonCRSTest.java | 2 +-
.../sis/referencing/GeodeticObjectVerifier.java | 10 +-
.../referencing/factory/sql/EPSGFactoryTest.java | 9 +-
.../DefaultConcatenatedOperationTest.java | 75 +++++-
.../operation/DefaultTransformationTest.java | 3 +-
.../referencing/operation/PassThroughOperation.xml | 4 +-
.../provider/ParameterNameTableGenerator.java | 18 +-
.../operation/provider/ProvidersTest.java | 121 +++++++++-
.../report/CoordinateReferenceSystems.java | 4 +-
.../sis/test/integration/ConsistencyTest.java | 41 +---
.../main/org/apache/sis/storage/base/CodeType.java | 25 +-
.../test/org/apache/sis/test/Assertions.java | 13 +-
.../org/apache/sis/test/ProjectDirectories.java | 79 ++----
64 files changed, 818 insertions(+), 547 deletions(-)
(sis) 01/01: Merge branch 'geoapi-4.0' into geoapi-3.1. Contains bug fixes.
Posted by de...@apache.org.
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 14ecaa65576268b7ff380292a2426a1790873286
Merge: 11f6114609 38a53c45ac
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Thu Sep 11 12:44:46 2025 +0200
Merge branch 'geoapi-4.0' into geoapi-3.1.
Contains bug fixes.
.../apache/sis/console/FormattedOutputCommand.java | 2 +-
.../org/apache/sis/console/TransformCommand.java | 4 +-
.../org/apache/sis/console/CRSCommandTest.java | 13 +
.../sis/coverage/grid/ClippedGridCoverageTest.java | 2 +-
.../org/apache/sis/xml/bind/lan/PT_FreeText.java | 2 +-
.../sis/metadata/xml/SchemaComplianceTest.java | 4 +-
.../sis/openoffice/ReferencingFunctions.java | 14 +-
.../sis/openoffice/ReferencingFunctionsTest.java | 8 +-
.../apache/sis/io/wkt/GeodeticObjectParser.java | 176 +++++++++-----
.../referencing/datum/DefaultDatumEnsemble.java | 15 ++
.../referencing/factory/AuthorityFactoryProxy.java | 33 ++-
.../factory/ConcurrentAuthorityFactory.java | 5 +-
.../factory/MultiAuthoritiesFactory.java | 2 +-
.../referencing/factory/sql/EPSGDataAccess.java | 12 +-
.../operation/AbstractCoordinateOperation.java | 58 ++---
.../operation/DefaultConcatenatedOperation.java | 43 +++-
.../DefaultCoordinateOperationFactory.java | 40 ++-
.../referencing/operation/projection/Mercator.java | 11 +-
.../operation/provider/AbstractLambert.java | 2 +
.../operation/provider/AbstractMercator.java | 2 +
.../operation/provider/AbstractStereographic.java | 2 +
.../operation/provider/AxisOrderReversal.java | 4 +-
.../operation/provider/AxisOrderReversal3D.java | 4 +-
.../operation/provider/CassiniSoldner.java | 4 +
.../operation/provider/Equirectangular.java | 10 +-
.../provider/FranceGeocentricInterpolation.java | 6 +-
.../operation/provider/GeocentricAffine.java | 31 ++-
.../operation/provider/GeocentricTranslation.java | 1 +
.../provider/GeographicAndVerticalOffsets.java | 5 +-
.../operation/provider/GeographicOffsets.java | 3 +-
.../provider/LambertAzimuthalEqualArea.java | 4 +
.../operation/provider/LambertConformal1SP.java | 3 +
.../operation/provider/LambertConformal2SP.java | 8 +-
.../provider/LambertConformalMichigan.java | 4 +-
.../operation/provider/LambertConformalWest.java | 1 +
.../provider/LambertCylindricalEqualArea.java | 4 +
.../operation/provider/MapProjection.java | 16 +-
.../operation/provider/Mercator1SP.java | 2 +
.../provider/ModifiedAzimuthalEquidistant.java | 4 +
.../referencing/operation/provider/Mollweide.java | 2 +-
.../operation/provider/ObliqueMercator.java | 2 +
.../operation/provider/ObliqueStereographic.java | 2 +
.../operation/provider/Orthographic.java | 4 +
.../operation/provider/PolarStereographicA.java | 2 +
.../referencing/operation/provider/Polyconic.java | 4 +
.../operation/provider/RegionalMercator.java | 36 ++-
.../operation/provider/TransverseMercator.java | 2 +
.../provider/ZonedTransverseMercator.java | 2 +
.../apache/sis/referencing/privy/WKTKeywords.java | 267 ++++++++-------------
.../sis/io/wkt/GeodeticObjectParserTest.java | 7 +-
.../org/apache/sis/referencing/Assertions.java | 67 +-----
.../org/apache/sis/referencing/CommonCRSTest.java | 2 +-
.../sis/referencing/GeodeticObjectVerifier.java | 10 +-
.../referencing/factory/sql/EPSGFactoryTest.java | 9 +-
.../DefaultConcatenatedOperationTest.java | 75 +++++-
.../operation/DefaultTransformationTest.java | 3 +-
.../referencing/operation/PassThroughOperation.xml | 4 +-
.../provider/ParameterNameTableGenerator.java | 18 +-
.../operation/provider/ProvidersTest.java | 121 +++++++++-
.../report/CoordinateReferenceSystems.java | 4 +-
.../sis/test/integration/ConsistencyTest.java | 41 +---
.../main/org/apache/sis/storage/base/CodeType.java | 25 +-
.../test/org/apache/sis/test/Assertions.java | 13 +-
.../org/apache/sis/test/ProjectDirectories.java | 79 ++----
64 files changed, 818 insertions(+), 547 deletions(-)
diff --cc endorsed/src/org.apache.sis.openoffice/main/org/apache/sis/openoffice/ReferencingFunctions.java
index f94b1178b6,c5337d7ae0..e9a7a679a5
--- a/endorsed/src/org.apache.sis.openoffice/main/org/apache/sis/openoffice/ReferencingFunctions.java
+++ b/endorsed/src/org.apache.sis.openoffice/main/org/apache/sis/openoffice/ReferencingFunctions.java
@@@ -28,6 -28,6 +28,7 @@@ import org.opengis.referencing.Identifi
import org.opengis.referencing.ReferenceSystem;
import org.opengis.referencing.cs.CoordinateSystem;
import org.opengis.referencing.cs.CoordinateSystemAxis;
++import org.opengis.referencing.crs.CRSAuthorityFactory;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.apache.sis.metadata.iso.extent.Extents;
import org.apache.sis.referencing.CRS;
@@@ -121,8 -124,13 +122,9 @@@ public class ReferencingFunctions exten
type = CodeType.guess(codeOrPath);
}
if (type.equals(CodeType.URN)) {
- object = CRS.getAuthorityFactory(null).createObject(codeOrPath);
- } else if (type.isCRS) {
+ CRSAuthorityFactory factory = CRS.getAuthorityFactory(null);
- if (factory instanceof GeodeticAuthorityFactory) {
- object = ((GeodeticAuthorityFactory) factory).createObject(codeOrPath);
- } else {
- object = factory.createCoordinateReferenceSystem(codeOrPath);
- }
++ object = factory.createObject(codeOrPath);
+ } else if (type.isAuthorityCode) {
object = CRS.forCode(codeOrPath);
} else {
/*
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/GeodeticObjectParser.java
index 94eb593acc,a712ecbbfa..930c73cec9
--- 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
@@@ -88,12 -89,14 +89,13 @@@ import org.apache.sis.util.privy.String
import org.apache.sis.util.resources.Errors;
import org.apache.sis.util.iso.Types;
+// Specific to the main and geoapi-3.1 branches:
+import org.opengis.referencing.ReferenceIdentifier;
+
// Specific to the geoapi-3.1 and geoapi-4.0 branches:
+ import org.opengis.coordinate.CoordinateMetadata;
import org.opengis.referencing.ObjectDomain;
-// Specific to the geoapi-4.0 branch:
-import org.apache.sis.referencing.crs.DefaultImageCRS;
-import org.apache.sis.referencing.datum.DefaultImageDatum;
-
/**
* Well Known Text (WKT) parser for referencing objects. This include, but is not limited too,
@@@ -1481,9 -1525,9 +1524,9 @@@ class GeodeticObjectParser extends Math
if (ellipsoid != null) { // `memberType` may be `Datum` or `GeodeticDatum`
member = datumFactory.createGeodeticDatum(properties, ellipsoid, meridian);
} else if (vertical) {
- member = datumFactory.createVerticalDatum(properties, (RealizationMethod) null);
+ member = datumFactory.createVerticalDatum(properties, VerticalDatumTypes.fromDatum(name, null, null));
} else if (datumType == TemporalDatum.class) {
- member = datumFactory.createTemporalDatum(properties, null);
+ member = datumFactory.createTemporalDatum(properties, (Temporal) null);
} else if (datumType == ParametricDatum.class) {
member = datumFactory.createParametricDatum(properties);
} else if (datumType == EngineeringDatum.class) {
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
index d6810f8665,a18d39d05b..ce15c98e42
--- 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
@@@ -1707,18 -1706,12 +1707,12 @@@ search: try (ResultSet result = execute
final boolean old = !deprecated || Semaphores.queryAndSet(Semaphores.SUSPEND_PARAMETER_CHECK);
try {
/*
- * 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.
- *
- * TODO: there is an ambiguity when the source CRS is geographic but the operation
- * is nevertheless considered as not a map projection. It is the case of EPSG:5819.
- * The problem is that the "COORD_REF_SYS_KIND" column still contains "Projected".
- * We need to check if EPSG database 10+ has more specific information.
- * See https://issues.apache.org/jira/browse/SIS-518
+ * For a ProjectedCRS, the baseCRS is usually geodetic. However, geocentric CRS
+ * is also allowed, but not yet supported in the code below. We could also have
+ * a ProjectedCRS derived from another ProjectedCRS.
*/
- if (baseCRS instanceof GeodeticCRS) {
- return factory.createProjectedCRS(metadata, (GeodeticCRS) baseCRS, fromBase, cs);
+ if (baseCRS instanceof GeographicCRS) {
+ return factory.createProjectedCRS(metadata, (GeographicCRS) baseCRS, fromBase, cs);
} else {
return factory.createDerivedCRS(metadata, baseCRS, fromBase, cs);
}
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
index f5ddb6ab61,d168be5067..38bf9d25ba
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
@@@ -957,6 -953,18 +957,19 @@@ check: for (int isTarget=0; ; isTa
@Override
protected String formatTo(final Formatter formatter) {
super.formatTo(formatter);
+ final Convention convention = formatter.getConvention();
+ final boolean isWKT1 = (convention.majorVersion() == 1);
+ if (convention.supports(Convention.WKT2_2019)) {
- getOperationVersion().ifPresent((version) -> {
++ String version = getOperationVersion();
++ if (version != null) {
+ formatter.append(new FormattableObject() {
+ @Override protected String formatTo(final Formatter formatter) {
+ formatter.append(version, null);
+ return WKTKeywords.Version;
+ }
+ });
- });
++ };
+ }
formatter.newLine();
@SuppressWarnings("LocalVariableHidesMemberVariable")
final CoordinateReferenceSystem sourceCRS = getSourceCRS(),
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java
index 656e9113cf,57917b27c6..73218601cf
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java
@@@ -47,11 -49,10 +49,13 @@@ import org.apache.sis.util.collection.C
import org.apache.sis.util.privy.UnmodifiableArrayList;
import org.apache.sis.util.privy.Constants;
import org.apache.sis.util.resources.Errors;
+ import org.apache.sis.io.wkt.Convention;
+ import org.apache.sis.io.wkt.FormattableObject;
import org.apache.sis.io.wkt.Formatter;
+// Specific to the main and geoapi-3.1 branches:
+import org.opengis.referencing.operation.SingleOperation;
+
/**
* An ordered sequence of two or more single coordinate operations. The sequence of operations is constrained