ISO-TC211 / StandardsTracker

This GitHub repository lets you - our users - log and track issues that you find with our standards and other document. Tag the issue with the standard or standards effected; we will assign it to the relevant group(s) within TC 211.
11 stars 0 forks source link

Direction of positive orientation #496

Closed cdobrien closed 5 days ago

cdobrien commented 1 month ago

There exist two different and opposite conventions for orientation in geographic data systems. These may be termed "Mathematical Orientation" and "Heading Orientation". Both are widely used in different communities of users and a transformation is required for interoperability. Mathematical Orientation is specified in ISO 19107 and used throughout the ISO TC211 suite of standards, and is positive in a counter-clockwise direction. Heading orientation is used in navigation, such as in the IHO S-100 based standards, and many other geographic applications and is positive in a clockwise direction. Both approaches are valid and it is not possible for either community to change their positions.

This difference was long debated in TC211 in the 1990s, but there was no agreement between the mathematicians and geographers. The mathematicians won and ISO 19107 and all of TC211 uses Mathematical Orientation.

Although this difference is very important it is not well documented. A note has been added to ISO 19152-3 LADM Marine Georegulation to address the specific interface with IHO standard S-121, but the general issue has not been addressed. This issue needs to be addressed in ISO TC211 and it needs to be "up front" covering all of the suite of TC211 standards. Therefore, it would seem best, to add a section, or at least a note in ISO 19101-1 Reference Model when this standard is next revised. It would also be logical to add a note, or at least a specific reference to the material in 19101-1, to ISO 19107 Spatial Schema. However, ISO 19107 is such a major and complex standard that it is unlikely to be revised any time soon. The orientation convention also has a major impact on ISO 19136 GML. It appears that some users of GML have encoded the opposite orientation convention. They may be self consistent in their application domain, but incompatible with others. A note or reference to the material in 19101-1 should be included in 19136.

The PMG should consider this topic high priority.

ReesePlews commented 1 month ago

thank you @cdobrien, important indeed. i have tried to add the respective labels to the issue. other members will chime in on the status of any revisions to those related standards and additional discussions.

PeterParslow commented 1 month ago

OGC GML & therefore ISO 19136 both adopt the "Mathematical Orientation" with ISO 19107, in that the external boundary of a surface shall be counter clockwise. It is clearest in the GML topology section describing a Face bounded by one or more rings: "Each such ring consists of directedEdges connected in a cycle, and is oriented with the face on its left."

Although not "one of ours" (either TC 211 or OGC), I see that GeoJSON takes the same approach, calling it the "right-hand rule" "with respect to the area it bounds, i.e., exterior rings are counterclockwise, and holes are clockwise." - someone would have to explain to me why that's a "right-hand rule" (that the surface is on the left of an observer travelling round the exterior ring!)

https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6

IHO's S-100 working group have begin to engage with this issue (https://github.com/iho-ohi/S-100WG/issues/13), so I've included our take on it there. So far, they think that their GML polygons are all "upside down"; presumably their S-100 based specs so far haven't dealt with the "Inside out" nature of such a polygon on the surface of the globe - each ENC just covering a "chart sized" bit of the earth's surface.

JanHjelmager commented 1 month ago

Given that at we have discussed this issue for almost 30 years (since the beginning of ISO/TC211), and as stated by Dough, it will have a high impact on many standards as well as on backwards compatability to start such a transformation. The latter issue is something we also have to take into consideration.

PeterParslow commented 1 month ago

I question whether the fact that part of "our community" doesn't comply with this aspect of our standards actually merits a note in our standards. Of course, where that "part of our community" is directly the target of a particular standard, such as ISO 19152-3 then a note is very sensible. But does it need explanation in ISO 19101, ISO 19107 or such? How about a (more public) explanatory note on our webpage?

JanHjelmager commented 1 month ago

I agree with Peter. However, if we put a general explanatory note on our webpage it might cause confusion, so it shall only be in relation to standards where it will be relevant.

cdobrien commented 1 month ago

If we put something only on our web page it may sound as if we are criticizing someone such as the IHO. I think the note should be very generic and not critical, and should be on our web page and in a future revision of 19101-1. It should be generic and address interfacing between the TC211 approach of using mathematical orientation (counter clockwise positive) and heading orientation (clockwise positive). Just a mention of the issue is enough. It is obvious what to do about it. Also we do not need to go any farther than mathematical or heading orientation. If one goes to space we are talking about Right Ascension which is positive clockwise but is inside out with us looking out to space.

JanHjelmager commented 1 month ago

I'm sure we can formulate something that we can put on our website in a way that doesn't offend or criticise any of our partner organisations (including IHO). The next question is whether such a question, i.e. orientation direction, belongs in the reference model (in this case 19101-1) or is the best place to include this information in 19107? - In my opinion the information belongs to 19107 and a note on our web page.

cdobrien commented 1 month ago

Actually, after thinking about it some more, we may want to address this whole topic in a very generic manner. If we look at Euclidean space we can simply understand "mathematical orientation" as positive in a counter clockwise direction. However if we look at real space the direction of positive rotation depends upon where we observe real space from. If we look down on the surface of the earth "mathematical orientation" as positive in a counter clockwise direction. But if we look up to the sky we reverse one dimension of real three dimensional space and that also flips the direction of positive rotation. We can't simply project everything onto a two dimensional surface. The third spatial dimension is real. We can perform transformations in three dimensional space but they always involve two axis or result in a change of direction of what we view as positive rotation. The right hand rule (or left hand rule) address spatial symmetry. No set of translations or rotations can shift from right handedness to left handedness, at least not unless we address singularities in general relativity and the Heisenberg uncertainty limits in quantum gravity. Although our standards such as 19107 operate in Euclidean space, in reality we operate in spherical geometry with two dimensions constrained to the surface of a sphere or an ellipsoid.

The solution to this issue is for people to be able to understand it, and this requires an explanation to be somewhere in our series of standards. Different communities of interest can choose to follow "mathematical orientation" positive in a counter clockwise direction or "heading orientation" positive in a clockwise direction, just as they can choose up to be positive (height) or down to be positive (depth). The translations are not difficult but one must know when translations are required. Nobody is wrong, and nobody needs to change what they are doing. We just need the interfaces.

With respect to GML, this is an ISO / OGC standard with "mathematical orientation" positive in a counter clockwise direction and height as positive in an up direction. If a different community of interest wants to use its own conventions in its data, that is fine, but there needs to be a translation into GML.

Our standards are very general and they work with different choices made by different communities of interest with appropriate interfaces. Our standards are however limited in that we can't map a donut shaped planet with a hole through it because the surface is a different topological class, and we can't (yet) map a journey through a worm hole.

JanHjelmager commented 5 days ago

The issue was discussed at the AG3 PMG meeting during the 2024 London Plenary. The conclusion at the PMG meeting was to leave it as-is (i.e. do nothing further).