iwxxm icon indicating copy to clipboard operation
iwxxm copied to clipboard

Representing geodesic lines using GML in IWXXM 2025-2

Open boris-ibl opened this issue 6 months ago • 1 comments

Details

Hello TT-AvData,

This is a follow-up to @dzinkhan mentioning geodesic lines at the MET3SG meeting at Eurocontrol in the context of replacing straight lines in Mercator (rhumb lines) in SIGMET with geodesic lines, as it was reported to have been agreed upon at the METP. Dirk also mentioned that probably no changes to the IWXXM schema are necessary.

The gml:LinearRing used in IWXXM SIGMET to represent polygons is linear (has straight lines) in the underlying CRS, in this case, the EPSG:4326 latitude/longitude Euclidean plane. This was in conflict with the Annex 3 which was prescribing rhumb lines (Mercator straight lines), whereas IWXXM had lines in EPSG:4326.

GML 3.2 spec: "A gml:LinearRing is defined by four or more coordinate tuples, with linear interpolation between them; the first and last coordinates shall be coincident."

To represent a polygon made of geodesic curve segments (shortest paths on the Earth ellipsoid), very likely a different approach using gml:GeodesicString would need to be taken which explicitly uses "geodesic" interpolation instead of the "linear" interpolation, for example:

<gml:Polygon srsName="urn:ogc:def:crs:EPSG::4326">
  <gml:exterior>
    <gml:Ring>
      <gml:curveMember>
        <gml:Curve gml:id="polygonBoundary">
          <gml:segments>
            <gml:GeodesicString interpolation="geodesic">
              <gml:posList>
                0 0
                10 0
                10 10
                0 10
                0 0
              </gml:posList>
            </gml:GeodesicString>
          </gml:segments>
        </gml:Curve>
      </gml:curveMember>
    </gml:Ring>
  </gml:exterior>
</gml:Polygon>

Similar logic might be relevant to IWXXM's (and also AIXM's) usage of gml:CircleByCenterPoint which is defined as "gml:ArcByCenterPoint with identical start and end angle to form a full circle. Again, this representation can be used only in 2D." used in TC SIGMET (and in the IWXXM Space Weather schema to express the dayside part of Earth). This might not be correct, as gml:CircleByCenterPoint is a circle in the 2D EPSG:4326 lat/lon plane, rather than a geodesic circle (and thus its radius should also be specified in degrees rather than km), unles I am reading the specifications completely wrong. But let's stick to just the geodesic polygons for now, before going on in too many directions.

Additional references:

Quotes from ISO 19107:2019(E) Geographic information — Spatial schema (of which GML is the XML implementation):

REQ. 17 When using a 2D CRS, all geometric measures, such as distance, bearing, length, area or volume, shall be consistent with the underlying GeometricReferenceSurface or Datum.

7 Interpolations for Curves 7.1 Requirements Class Line Curve 7.1.1 Semantics This package (see Figures 21 and 22) contains the first curve segments based on the path of shortest distance between points. In a Euclidean space such as a planar Reference Surface, this is the straight lines between points. Some arguments have been made that "line" and "geodesic" should be the same class, but the term "line" is often used to mean a "linear interpolation" between points based on the coordinate system. In most cases in geography where the "surface is curved”, this differs from "geodesic" which is always the path of shortest length between nearby points. All lines in this document are linear interpolations in the coordinate system being used.

7.1.2 Interface Line 7.1.2.1 Semantics A Line (Figure 23) consists of sequence of line segments, each having a parameterization between two consecutive dataPoints. The dataPoints (inherited from Curve) of a Line are a sequence of positions between which the curve is linearly interpolated. The first position in the sequence is the startPoint of the Line, and the last point in the sequence is the endPoint of the Line. 7.1.2.2 Attribute interpolation: CurveInterpolation=linear For the interface Line, the interpolation attribute (inherited from curve) is always "linear". Line::interpolation:CurveInterpolation="linear"

7.3 Requirements Class Geodesic Curve 7.3.1 Semantics In a more general setting, where the GeometricReferenceSurface is not flat but curved (as on a geoid, ellipsoid or sphere), the shortest path between points is a geodesic. The term applies on any manifold that has an associated Gaussian or Riemannian metric (which acts as a "dot" product of the vectors in the tangent space at each point), including the situation where geometry gets is name ("geo" means Earth).

7.3.2 Interface Geodesic 7.3.2.1 Semantics A Geodesic (Figure 22) consists of sequence of geodesic segments. The class is an array of geodesic segments, each segment spanning the consecutive dataPoints. REQ. 140 A geodesic shall represent a set of geodesic curves between data points (see 3.41). A geodesic is a curve on the GeometricReferenceSurface being used; since the Reference Surface is embedded in a Euclidean 3-space, it is also a curve in 3-space.

GML 3.2 Spec: gml:GeodesicString implements ISO 19107 GM_GeodesicString (see D.2.3.4 and ISO 19107:2003, 6.4.12), a sequence of geodesic segments. The number of control points shall be at least two. Interpolation is fixed as "geodesic".

It would be good to confirm this with someone who is an expert in ISO 19107 and GML. But the fact that gml:LinearRing is linear in the 2D CRS plane I believe is widely accepted.

Best regards, Boris

Requestor

Boris Burger (IBL Software Engineering)

boris-ibl avatar Jun 04 '25 13:06 boris-ibl

Disclaimer: the GML example needs to be double-checked for correctness / adherence to the GML schema.

boris-ibl avatar Jun 04 '25 13:06 boris-ibl

Closed as it is now being handled under #373.

blchoy avatar Nov 21 '25 17:11 blchoy