opengeospatial / styles-and-symbology

OGC Styles & Symbology Standards
Other
11 stars 6 forks source link

Are s_Covers and s_CoveredBy really standard spatial relations? #39

Open nicolas-heigvd opened 1 year ago

nicolas-heigvd commented 1 year ago

Hello,

As stated in your draft, are s_Covers and s_CoveredBy really standard spatial relations?

https://github.com/opengeospatial/styles-and-symbology/blob/d13666188460f01b9c75b871fd2018a8eaeeb995/core/sections/clause_18_functions.adoc?plain=1#L79-L80

If yes, where are they defined?

Because the OGC SFA only specify the following:

image

So maybe it's worth discussing an update to the OGC SFA before integrating them here? Who is in charge for such updates, if needed?

Thanks for your answer. Warm Regards.

ebocher commented 1 year ago

Good catch @nicolas-heigvd . s_Covers and s_CoveredBy are not defined. Thanks.

jerstlouis commented 1 year ago

@ebocher @nicolas-heigvd

covers() and coveredBy() are not defined in Simple Features Access, but they are part of the Dimensionally Extended 9-Intersection Model (DE-9IM).

As noted on that Wikipedia page:

The mask T*****FF* occurs in the definition of both Contains and Covers. Covers is a more inclusive relation. In particular, unlike Contains it does not distinguish between points in the boundary and in the interior of geometries. For most situations, Covers should be used in preference to Contains. Similarly, the mask T*F**F*** occurs in the definition of both Within and CoveredBy. For most situations, CoveredBy should be used in preference to Within.

We should indeed file a change request to have them added to SFA. I believe most spatial libraries implement them.

We had a similar discussion in CQL2, but decided to not add them yet. For Styles & Symbology, potentially we could leave them in the model for awareness and including a note about their status, without requiring them for conformance until they are added to SFA.

@ghobona Where should we file a change request for SFA?

chris-little commented 1 year ago

Maybe there should be a Cross-SWG discussion of full vs partial implementations, and non-canonical ("unnormalised") versions of the Allen Agebra, 4-Intersections and DE-9IM?

The W3C Time Ontology has the full set of Allen relationships (13) , in one dimension, but there were practical real-world needs to augment them with easy-to-use (non-canonical) combinations.

jerstlouis commented 1 year ago

If I understand correctly, one can easily implement Covers() and ContainsBy() using the Relate() method already defined in Simple Features Access as follows:

Covers(a, b) =
   Relate(a, b, T*****FF*) OR Relate(a, b, *T****FF*) OR Relate(a, b, ***T**FF*) OR Relate(a, b, ****T*FF*)

CoveredBy(a, b) =
   Relate(a, b, T*F**F***) OR Relate(a, b, *TF**F***) OR Relate(a, b, **FT*F***) OR Relate(a, b, **F*TF***)