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 2024/04/05 21:44:47 UTC
(sis) branch main updated (b35ebd489f -> a5db7e3106)
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 b35ebd489f Merge branch 'geoapi-3.1'. This is the beginning of an upgrade to ISO 19111:2019.
add cfb0e166e2 Post-merge cleanup. The `DefaultGeocentricCRS` class and its factory methods are marked as deprecated since 2.0 instead of 1.5 because we will not deprecate that class in the branch that depends on GeoAPI 3.0, because there is no replacement. The replacements will need to wait for GeoAPI 3.1.
add c39f9ef256 Update for the removal of deprecated ImageDatum, ImageCRS and UserDefinedCS interfaces. Those interfaces were defined in ISO 19111:2007 but removed in ISO 19111:2019.
add f173cc01f5 Merge branch 'geoapi-4.0' into geoapi-3.1, but without the removal of deprecated interfaces and methods.
new a5db7e3106 Merge branch 'geoapi-3.1'.
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:
.../main/org/apache/sis/io/wkt/Convention.java | 7 +------
.../org/apache/sis/io/wkt/GeodeticObjectParser.java | 8 ++++----
.../main/org/apache/sis/referencing/CRS.java | 20 ++++++++++++++------
.../sis/referencing/crs/DefaultEngineeringCRS.java | 4 ++++
.../apache/sis/referencing/crs/DefaultImageCRS.java | 6 +++---
.../sis/referencing/cs/DefaultUserDefinedCS.java | 4 ++--
.../sis/referencing/datum/DefaultImageDatum.java | 6 +++---
.../referencing/factory/GeodeticObjectFactory.java | 2 +-
.../apache/sis/referencing/internal/Resources.java | 5 +++++
.../sis/referencing/internal/Resources.properties | 1 +
.../sis/referencing/internal/Resources_fr.properties | 1 +
.../sis/referencing/AuthorityFactoriesTest.java | 3 ++-
.../referencing/factory/AuthorityFactoryMock.java | 3 +++
13 files changed, 44 insertions(+), 26 deletions(-)
(sis) 01/01: Merge branch 'geoapi-3.1'.
Posted by de...@apache.org.
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 a5db7e310668372fd6e2f142f45ca56f7f6dc5cf
Merge: b35ebd489f f173cc01f5
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Fri Apr 5 23:44:04 2024 +0200
Merge branch 'geoapi-3.1'.
.../main/org/apache/sis/io/wkt/Convention.java | 7 +------
.../org/apache/sis/io/wkt/GeodeticObjectParser.java | 8 ++++----
.../main/org/apache/sis/referencing/CRS.java | 20 ++++++++++++++------
.../sis/referencing/crs/DefaultEngineeringCRS.java | 4 ++++
.../apache/sis/referencing/crs/DefaultImageCRS.java | 6 +++---
.../sis/referencing/cs/DefaultUserDefinedCS.java | 4 ++--
.../sis/referencing/datum/DefaultImageDatum.java | 6 +++---
.../referencing/factory/GeodeticObjectFactory.java | 2 +-
.../apache/sis/referencing/internal/Resources.java | 5 +++++
.../sis/referencing/internal/Resources.properties | 1 +
.../sis/referencing/internal/Resources_fr.properties | 1 +
.../sis/referencing/AuthorityFactoriesTest.java | 3 ++-
.../referencing/factory/AuthorityFactoryMock.java | 3 +++
13 files changed, 44 insertions(+), 26 deletions(-)
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/GeodeticObjectParser.java
index 80d33f41ed,1b9ca46297..bf1888bd5c
--- 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
@@@ -1578,9 -1563,10 +1578,9 @@@ class GeodeticObjectParser extends Math
*
* @param mode {@link #FIRST}, {@link #OPTIONAL} or {@link #MANDATORY}.
* @param parent the parent element.
- * @return the {@code "ImageDatum"} element as an {@link ImageDatum} object.
+ * @return the {@code "ImageDatum"} element.
* @throws ParseException if the {@code "ImageDatum"} element cannot be parsed.
*/
- @SuppressWarnings("deprecation")
private ImageDatum parseImageDatum(final int mode, final Element parent) throws ParseException {
final Element element = parent.pullElement(mode, WKTKeywords.ImageDatum, WKTKeywords.IDatum);
if (element == null) {
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/CRS.java
index f2df4e7307,5a757e688a..763e9465ef
--- 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
@@@ -913,9 -958,9 +913,9 @@@ public final class CRS extends Static
/**
* Returns the epoch to which the coordinates of stations defining the dynamic CRS are referenced.
- * If the CRS is associated to a dynamic reference frame, then the reference
- * epoch of that datum is returned. Otherwise if the CRS is {@linkplain CompoundCRS compound},
- * then the first reference epoch found in a component is returned.
- * If the CRS is associated to a {@linkplain DynamicReferenceFrame dynamic datum}, then the epoch
++ * If the CRS is associated to a dynamic datum, then the epoch
+ * of that datum is returned. Otherwise if the CRS is {@linkplain CompoundCRS compound}, then this
+ * method requires that all dynamic components have the same epoch.
*
* @param crs the coordinate reference frame from which to get the epoch, or {@code null}.
* @return epoch to which the coordinates of stations defining the dynamic CRS frame are referenced.
@@@ -926,13 -973,19 +928,19 @@@
if (crs instanceof SingleCRS) {
final Datum datum = ((SingleCRS) crs).getDatum();
if (datum instanceof DynamicReferenceFrame) {
- return Optional.of(((DynamicReferenceFrame) datum).getFrameReferenceEpoch());
+ epoch = ((DynamicReferenceFrame) datum).getFrameReferenceEpoch();
}
} else if (crs instanceof CompoundCRS) {
- for (SingleCRS component : ((CompoundCRS) crs).getSingleComponents()) {
+ for (SingleCRS component : getSingleComponents(crs)) {
final Datum datum = component.getDatum();
if (datum instanceof DynamicReferenceFrame) {
- return Optional.of(((DynamicReferenceFrame) datum).getFrameReferenceEpoch());
+ final Temporal t = ((DynamicReferenceFrame) datum).getFrameReferenceEpoch();
+ if (t != null) {
+ if (epoch == null) epoch = t;
+ else if (!epoch.equals(t)) {
+ throw new GeodeticException(Resources.format(Resources.Keys.InconsistentEpochs_2, epoch, t));
+ }
+ }
}
}
}
diff --cc endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/factory/AuthorityFactoryMock.java
index 35344e3953,291317e1d0..11385f8901
--- a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/factory/AuthorityFactoryMock.java
+++ b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/factory/AuthorityFactoryMock.java
@@@ -103,8 -103,12 +103,11 @@@ public final class AuthorityFactoryMoc
/**
* Returns the authority codes for the given type.
+ *
+ * @param type the type of referencing object for which to get authority codes.
+ * @return the set of authority codes for referencing objects of the given type.
*/
@Override
- @SuppressWarnings("deprecation")
public Set<String> getAuthorityCodes(Class<? extends IdentifiedObject> type) {
assertFalse(isClosed());
final Set<String> codes = new LinkedHashSet<>();