Are the GeoSPARQL RIF rules incorrect
Closed this issue · 3 comments
While sending our RIF rules out to external review, I got confused with them and need clarity.
The 4 RIF rules are:
- feature - feature rule
- feature - geometry rule
- geometry - feature rule
- geometry - geometry rule
I understand the feature - feature rule, e.g. for sfEquals
:
?f1[geo:sfEquals->?f2
if
(?f1[geo:hasDefaultGeometry->?g1]
?f2[geo:hasDefaultGeometry->?g2]
?g1[ogc:asGeomLiteral->?g1Serial]
?g2[ogc:asGeomLiteral->?g2Serial]
External(ogc:function (?g1Serial,?g2Serial)))
which means:
- if ?g1 is the Geometry of ?f1 and g1Serial is its serialization
- ?g2 is the Geometry of ?f2 and ?g2Serial is its serialization
- and if the external function `geof:sfEquals(?g1Serial, ?g2Serial)
- then it is true
But I do not understand the other rules. For example, the "feature - geometry rule" for sfEquals
reads:
(?f1[geo:hasDefaultGeometry->?g1]
?g1[ogc:asGeomLiteral->?g1Serial]
?f2[ogc:asGeomLiteral->?g2Serial]
External(ogc:function (?g1Serial,?g2Serial)))
which I take to mean:
- if ?g1 is the Geometry of ?f1 and g1Serial is its serialization
- ?g2Serial is the serialization of ?f2
- and if the external function `geof:sfEquals(?g1Serial, ?g2Serial)
- then it is true
but ?g2Serial is the serialization of ?f2 be true as GeoSPARQL has no function/rule to extract a geometry serialization from a Feature
, only a Geometry
which may or may not be related to a Feature
. And similarly for the other non feature - feature rules. Also note that GeoSPARQL can't express topological relations between Geometry
instances
Q: how are the following rules possible in GeoSPARQL:
- feature - geometry rule
- geometry - feature rule
- geometry - geometry rule
If rules 2 - 4 are not correct, we can still express RIF rules for feature - feature rule x each SF, DEM9 & RCC8 topological relation.
@mperry455 can you please shed any light on this, based on the GeoSPARQL 1.0 RIF template unchanged in 1.1?
I think the RIF rules are correct, because the range of the topological relations is SpatialObject and not Geometry
Thanks @situx, yes, this solves my problem: should have looked at the ontology's range values for the topological properties...