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 ffcd9d444d Workaround for the parsing of WKT having some of the axis 
directions added in latest ISO 19111 revision.
ffcd9d444d is described below

commit ffcd9d444dd37ace1383fbf52f043619ffb971bd
Author: Martin Desruisseaux <martin.desruisse...@geomatys.com>
AuthorDate: Sun Nov 12 21:04:26 2023 +0100

    Workaround for the parsing of WKT having some of the axis directions added 
in latest ISO 19111 revision.
---
 .../main/org/apache/sis/io/wkt/GeodeticObjectParser.java          | 8 ++++++++
 .../main/org/apache/sis/referencing/util/AxisDirections.java      | 8 ++++++++
 2 files changed, 16 insertions(+)

diff --git 
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
index 117525bcc5..a2924a6bc3 100644
--- 
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
@@ -96,6 +96,14 @@ import static java.util.Collections.singletonMap;
  * @author  Johann Sorel (Geomatys)
  */
 class GeodeticObjectParser extends MathTransformParser implements 
Comparator<CoordinateSystemAxis> {
+    /*
+     * Force class initialization of `AxisDirections` in order to have
+     * its constants added to the list of know `AxisDirection` values.
+     */
+    static {
+        AxisDirections.AWAY_FROM.toString();
+    }
+
     /**
      * The names of the 7 parameters in a {@code TOWGS84[…]} element.
      * Those names are derived from the <cite>Well Known Text</cite> (WKT) 
version 1 specification.
diff --git 
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/util/AxisDirections.java
 
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/util/AxisDirections.java
index bef4577fa1..2efa62e0c6 100644
--- 
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/util/AxisDirections.java
+++ 
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/util/AxisDirections.java
@@ -93,6 +93,14 @@ public final class AxisDirections extends Static {
     @UML(identifier="starboard", obligation=CONDITIONAL, 
specification=ISO_19162)
     public static final AxisDirection STARBOARD = 
AxisDirection.valueOf("STARBOARD");
 
+    /**
+     * Port direction.
+     * For an observer at the centre of the object this will be towards its 
left.
+     * Added in ISO 19111:2019 (was not in ISO 19111:2007).
+     */
+    @UML(identifier="port", obligation=CONDITIONAL, specification=ISO_19162)
+    public static final AxisDirection PORT = AxisDirection.valueOf("PORT");
+
     /**
      * Direction of geographic angles (bearing).
      * Added in ISO 19111:2019 (was not in ISO 19111:2007).

Reply via email to