[Resolved] Correct way of representing SIGMET polygons that cross the dateline #266
Replies: 3 comments
-
This is not a new issue and we had already have some discussions on this topic (see #217). If we accept dirty methods, as we can specify CRS for individual geometric objects, the easiest thing we can do is to put objects into CRSs with the same datum/ellipsoid but different meridian (e.g. 0 or 180 degrees longitude) to avoid the dateline issue and let the consuming software decide what to do with these objects. Nevertheless, I am not aware such CRSs exist. May be @porosnie could give us updates on this topic? |
Beta Was this translation helpful? Give feedback.
-
Perhaps there is no suitable well-known CRS that would represent "EPSG:4326 centered at the anti-meridian", nor anything of the sort. I spent some time looking through PROJ library's database of well known projections and found nothing suitable. Instead of a reference to a well known CRS we could potentially put a full definition of a CRS in GML, similar to http://www.opengis.net/def/crs/EPSG/8.5/4326 but with a different central meridian. I am not really a fan of custom CRS definitions, because it would greatly increase the burden on the side of IWXXM consumers who would have to be able to fully interpret these CRS definitions. That is not an easy task. Surely with the right combination of PROJ/GDAL/other packages one should be able to construct the projection equations, but it seems like an overkill. There still remains the workaround with splitting the polygons at the date line, and storing 2 or more LinearRings. If I am not mistaken, this would not be a valid IWXXM 3.0. But is there any other option (besides defining a custom CRS) that would conform to all the standards? |
Beta Was this translation helpful? Give feedback.
-
Small update. @jkorosi found out that there are projections that have central meridian elsewhere:
That being said, I believe (and Jan agrees) that the data consumers would be taken completely off-guard by use of such CRS. In GeoJSON, the specification authors originally considered allowing any CRS to be specified, but finally settled on CRS 84 to be used for everything, and they also explicitly suggest to split any features that cross the antimeridian. There are some interesting explanations of the reasoning behind this in the GeoJSON spec https://tools.ietf.org/html/rfc7946.
We definitely agree that the processing software might not have access to CRS databases, or to a library that is able to interpret the CRS down to the real equations for converting between lat/lon and the given CRS. Full blown GIS software might be able to do that, but not all IWXXM consumers will have such sophisticated tools at hand. BTW the GeoJSON spec also describes what @jkorosi seems to call "Choy's bounding box trick", the thing that you suggested in the SWXA thread: https://tools.ietf.org/html/rfc7946#page-14 section 5.2 The Antimeridian (in Section 5 Bounding Box). |
Beta Was this translation helpful? Give feedback.
-
Hello,
has there been any discussion regarding GML polygons that cross the dateline? Both EPSG:4326 and EPSG:3395 that are the most commonly mentioned projections in context of IWXXM have bounds that range from -180 to +180 with central meridian at 0 degrees longitude:
Take for example this SIGMET in New Zealand Oceanic FIR (ICAO: NZZO) that crosses the dateline (pardon the crude drawing):
For TAC SIGMET output, we store the 4 latitude/longitude coordinates in CW order (plus the 5th one to close the polygon), e.g. WI S4700 W17400 - S5400 W17600 - S5400 E17600 - S4600 E17800 - S4700 W17400. Annex 3 does not really say, which particular parametrization of Mercator should be used to connect the points (i.e. which central meridian to use). The assumption likely is that the end-user or software used for display is clever enough to deduce that this is a polygon that spans the dateline and interpret it as the forecaster meant.
IWXXM/AIXM/GML however are much more precise in the usage of projections, so in the case of EPSG:4326 or EPSG:3395 the projection bounds or central meridian are a part of the CRS definition.
Our software would store the above polygon in EPSG:4326 like this (potentially wrong, but we are not sure):
GML requires for exterior rings to be in CCW order. The above points are arguably not CCW - assuming that the CCW rule is relative to the specified CRS, and the above is not really CCW in EPSG:4326, strictly speaking.
If one shifted the longitudes by 180 or 360 to the east, then it would be really counter-clockwise. Or if we used longitude 184 in place of -176, then it would be more clear and CCW. But the problem with such shifted polygons is they would be out of the bounds of EPSG:4326 that end at 180.
If the polygon is written like the above within the -180 to 180 bounds of EPSG:4326, a lot of GIS software would probably interpret the polygon like this:
I was looking at the OGC Use of Geography Markup Language (GML) for Aviation Data (https://portal.opengeospatial.org/files/?artifact_id=62061) but this best practices document does not seem to address the dateline issue.
In the following ESA document https://wiki.services.eoportal.org/tiki-download_wiki_attachment.php?attId=653&usg=AOvVaw3ol5sRYun_Pbb1HvCyyjN5 the same issue with GML and dateline is mentioned in section 3.3
ENCODING RULES FOR GEOMETRIES TO AVOID DATELINE ISSUE from page 24 onwards. They offer some alternative solutions:
From these solutions I have a strong feeling only the first two are correct in terms of the GML specification strictly speaking (splitting the polygon in two, or using a CRS which is rotated by e.g. 180).
Any guidance on this subject is really appreciated.
Boris
Beta Was this translation helpful? Give feedback.
All reactions