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 75c7265a47 Add only on the `geoapi-3.1` branch some deprecated methods
anticipating a transition between GeoAPI 3.0 and 4.0.
75c7265a47 is described below
commit 75c7265a4777de2ede07dccabdb79dbc873932a6
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Fri Aug 30 15:53:53 2024 +0200
Add only on the `geoapi-3.1` branch some deprecated methods anticipating a
transition between GeoAPI 3.0 and 4.0.
---
.../referencing/datum/DefaultVerticalDatum.java | 16 +++++++++++
.../referencing/factory/GeodeticObjectFactory.java | 32 ++++++++++++++++++++++
2 files changed, 48 insertions(+)
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 0ea312039c..0e116de37b 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
@@ -290,6 +290,22 @@ public class DefaultVerticalDatum extends AbstractDatum
implements VerticalDatum
frameReferenceEpoch = Objects.requireNonNull(epoch);
}
+ /**
+ * Creates a dynamic reference frame from the given properties.
+ * See super-class constructor for more information.
+ *
+ * @param properties the properties to be given to the identified
object.
+ * @param type the type of this vertical datum.
+ * @param epoch the epoch to which the definition of the
dynamic reference frame is referenced.
+ *
+ * @deprecated As of ISO 19111:2019, the {@code VerticalDatumType}
argument is replaced by {@code RealizationMethod}.
+ */
+ @Deprecated(since = "2.0") // Temporary version number until this
branch is released.
+ public Dynamic(Map<String,?> properties, VerticalDatumType type,
Temporal epoch) {
+ super(properties, type);
+ frameReferenceEpoch = Objects.requireNonNull(epoch);
+ }
+
/**
* Creates a new datum with the same values as the specified datum,
which must be dynamic.
*
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 098500a7cf..e73d8a8dc5 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
@@ -1166,6 +1166,38 @@ public class GeodeticObjectFactory extends
AbstractFactory implements CRSFactory
return unique("createVerticalDatum", datum);
}
+ /**
+ * Creates a dynamic vertical datum from an enumerated type value and a
frame reference epoch.
+ * The arguments are the same as for the {@linkplain
#createVerticalDatum(Map, VerticalDatumType)
+ * static datum}, with the addition of a mandatory frame reference epoch.
+ *
+ * @param properties name and other properties to give to the new object.
+ * @param type the type of this vertical datum (often geoidal).
+ * @param epoch the epoch to which the definition of the dynamic
reference frame is referenced.
+ * @throws FactoryException if the object creation failed.
+ *
+ * @see DefaultVerticalDatum.Dynamic#Dynamic(Map, VerticalDatumType,
Temporal)
+ * @see GeodeticAuthorityFactory#createVerticalDatum(String)
+ *
+ * @since 1.5
+ *
+ * @deprecated As of ISO 19111:2019, the {@code VerticalDatumType}
argument is replaced by {@code RealizationMethod}.
+ */
+ @Deprecated(since = "2.0") // Temporary version number until this branch
is released.
+ public VerticalDatum createVerticalDatum(final Map<String,?> properties,
+ final VerticalDatumType type,
+ final Temporal epoch)
+ throws FactoryException
+ {
+ final DefaultVerticalDatum datum;
+ try {
+ datum = new DefaultVerticalDatum.Dynamic(complete(properties),
type, epoch);
+ } catch (IllegalArgumentException exception) {
+ throw new InvalidGeodeticParameterException(exception);
+ }
+ return unique("createVerticalDatum", datum);
+ }
+
/**
* Creates a vertical coordinate system.
* This coordinate system can be used with vertical and derived CRS.