Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CQL2: Spatial Operators Issues #734

Closed
jerstlouis opened this issue Jul 7, 2022 · 1 comment · Fixed by #745
Closed

CQL2: Spatial Operators Issues #734

jerstlouis opened this issue Jul 7, 2022 · 1 comment · Fixed by #745

Comments

@jerstlouis
Copy link
Member

jerstlouis commented Jul 7, 2022

In Table 2 of 7.6, some of the mathematical definitions seem incorrect:

  • S_CONTAINS is defined as S_CONTAINS(a,b) ⬄ b CONTAINS a -- First, I think it should have been the other way around, a CONTAINS b. But that definition would still be ambiguous. The SFA definition on page 39 (XXXIX) is defined as b.Within(a), because Intersects and Contains are convenience wrappers around Disjoint and Within respectively. Within itself is unambiguously defined mathematically. Perhaps the intent was for this to be S_CONTAINS(a,b) ⬄ b WITHIN a. This is quite important because the actual meaning of Contains is particularly counter-intuitive, as the Wikipedia page states:
    • The predicates Contains and Within have subtle aspects to their definition which are contrary to intuition. For example,[10] a line L which is completely contained in the boundary of a polygon P is not considered to be contained in P. This quirk can be expressed as "Polygons do not contain their boundary". This issue is caused by the final clause of the Contains definition above: "at least one point of the interior of B lies in the interior of A". For this case, the predicate Covers has more intuitive semantics (see definition), avoiding boundary considerations.
  • A related question is whether CQL2 should define Covers and CoveredBy as recommended instead of (or in addition to) Contains and Within?
  • S_WITHIN is defined as S_WITHIN(a,b) ⬄ (a ∩ b = a) ∧ (I(a) ∩ E(b) ≠ ∅), however I believe that should be S_WITHIN(a,b) ⬄ (a ∩ b = a) ∧ (I(a) ∩ E(b) = ∅), (= ∅, the interior of A should not intersect with the exterior of B for a to be within b), so their intersection is equal to the empty set, as it is on page 38 of Simple Features Access.
  • It would be useful to explain that I(a) means the interior of a and E(a) means the exterior of A (B(a) means the boundary of a, but that was only used in the DE9IM definitions).
@cportele
Copy link
Member

Meeting 2022-07-22:

  • b WITHIN a is correct.
  • We reference Simple Feature Access, where Covers and CoveredBy are not included. For v1.0 we will keep the list as in SFA, we can add more in future revisions, if we see that other spatial operators are used a lot in practice.
  • = ∅ is correct.
  • Add an explanation about the notation (I(a), E(a)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants