Re: Spatial datatypes and RDF/OWL

On 15 Apr 2008, at 11:26, John Goodwin wrote:
>
>> On Mon, 2008-04-14 at 11:12 +0100, John Goodwin wrote:
>>
>>> It would be nice to see spatial extension to triples stores (in an
>>> analogous way to spatial extensions of relational databases) that
>>> allow SPARQL queries of the form:
>>
>>>            ?a hasGeometry ?g1 .
>>>            ?b hasGeometry ?g2 .
>>>            FILTER (touches(g1,g2))
>>
>> I also find your use of FILTER operator for touches more attractive
> than
>> using it as a predicate in the graph pattern - it maintains the nice
>> boundary between object data and spatial datatype data.
>>
>
> Yes I agree - seems more elegant some how, and presumably an analogous
> "built in" could be added to SWRL/DL Safe Rules so that I could say
> something along the lines of
>
> hasGeom(a,g1) ^ hasGeom(b,g1) ^ swrlb:TOUCHES(g1,g2) -> adjacent(a,b)
>
> so that people could use the predicate in the graph pattern should  
> they
> prefer.

I don't imagine that you'd want to do something like

FILTER(withinDistance(?g1, ?g2, 3.2))

with triples. You could write it as

[] a :PairwiseDistance ;
    :point ?g1 ;
    :point ?g2 ;
    :distance ?d ;
FILTER(?d < 3.2)

but it seems a bit verbose, and if you try to materialise the graph it  
will be massive.

- Steve

Received on Tuesday, 15 April 2008 12:42:19 UTC