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
commit b33e87aa76ddcb9214532e23a20f53b84a596884 Author: Martin Desruisseaux <martin.desruisse...@geomatys.com> AuthorDate: Wed Jan 29 17:14:57 2025 +0100 Support ISO 19162:2019 keyword for GeographicCRS as parsing time. This is not a real upgrade of WKT 2 support, only a help for a common case. --- .../main/org/apache/sis/io/wkt/GeodeticObjectParser.java | 15 +++++++++------ .../org/apache/sis/referencing/privy/WKTKeywords.java | 3 +++ 2 files changed, 12 insertions(+), 6 deletions(-) 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 ecdfa88305..57e02e04a0 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 @@ -1718,11 +1718,14 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo { final Element element = parent.pullElement(mode, (csType != null) ? new String[] {WKTKeywords.BaseGeodCRS, // [0] WKT 2 in ProjectedCRS or DerivedCRS - WKTKeywords.GeogCS} // [1] WKT 1 in ProjectedCRS + WKTKeywords.BaseGeogCRS, // [1] WKT 2 as a specialization of above + WKTKeywords.GeogCS} // [2] WKT 1 in ProjectedCRS : new String[] {WKTKeywords.GeodeticCRS, // [0] WKT 2 - WKTKeywords.GeogCS, // [1] WKT 1 - WKTKeywords.GeodCRS, // [2] WKT 2 - WKTKeywords.GeocCS}); // [3] WKT 1 + WKTKeywords.GeographicCRS, // [1] WKT 2 as a specialization of above + WKTKeywords.GeogCS, // [2] WKT 1 + WKTKeywords.GeodCRS, // [3] WKT 2 + WKTKeywords.GeogCRS, // [4] WKT 2 as a specialization of above + WKTKeywords.GeocCS}); // [5] WKT 1 if (element == null) { return null; } @@ -1768,7 +1771,7 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo } break; } - case 1: { + case 2: { /* * WKT 1 "GeogCS" (Geographic) element. */ @@ -1779,7 +1782,7 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo dimension = 2; break; } - case 3: { + case 5: { /* * WKT 1 "GeocCS" (Geocentric) element. */ diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/privy/WKTKeywords.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/privy/WKTKeywords.java index 128e6c70ab..2780d8f56c 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/privy/WKTKeywords.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/privy/WKTKeywords.java @@ -100,8 +100,11 @@ public final class WKTKeywords extends Static { Datum = "Datum", GeodeticDatum = "GeodeticDatum", GeodeticCRS = "GeodeticCRS", + GeographicCRS = "GeographicCRS", BaseGeodCRS = "BaseGeodCRS", + BaseGeogCRS = "BaseGeogCRS", GeodCRS = "GeodCRS", + GeogCRS = "GeogCRS", GeogCS = "GeogCS", GeocCS = "GeocCS";