You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Heidi McClure <he...@issinc.com> on 2014/02/27 18:49:06 UTC
Order of Spatial Constraints
After experimenting with the spatial constraints (like withinCircle), I've noticed that I must have the spatial constraint FIRST in my set of constraints. Is this by design?
If I do this query it works (withinCircle is first in my set of constraints):
SELECT DISTINCT ?Event1 ?Event1_inCountry WHERE {
?Event1 <http://jena.apache.org/spatial#withinCircle> (38.8633 -104.7919 700 'miles') .
?Event1 <http://issinc.com/test#inCountry> ?Event1_inCountry .
?Event1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://issinc.com/test#Event> .
}
If I move the spatial constraint further down the list, it fails:
SELECT DISTINCT ?Event1 ?Event1_inCountry WHERE {
?Event1 <http://issinc.com/test#inCountry> ?Event1_inCountry .
?Event1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://issinc.com/test#Event> .
?Event1 <http://jena.apache.org/spatial#withinCircle> (38.8633 -104.7919 700 'miles') .
}
warning I see is:
10:04:58 WARN Fuseki :: [68] RC = 500 : Attempt to reassign '?Event1' from '<http://issinc.com/test#event_901112280020>' to '<http://issinc.com/test#event_901112280020>'
thanks,
-heidi
RE: Order of Spatial Constraints
Posted by Heidi McClure <he...@issinc.com>.
I'm using 2.11.0 I will try version 2.11.1 which should have the fix you note below. Thank You.
-----Original Message-----
From: Andy Seaborne [mailto:andy@apache.org]
Sent: Saturday, March 01, 2014 12:27 PM
To: users@jena.apache.org
Subject: Re: Order of Spatial Constraints
On 27/02/14 17:49, Heidi McClure wrote:
> After experimenting with the spatial constraints (like withinCircle), I've noticed that I must have the spatial constraint FIRST in my set of constraints. Is this by design?
Heidi,
The order of the execution greatly affects the speed of a query but it should not the answers.
Which version are you running? It looks like JENA-549 which is fixed.
Andy
https://issues.apache.org/jira/browse/JENA-549
>
> If I do this query it works (withinCircle is first in my set of constraints):
>
> SELECT DISTINCT ?Event1 ?Event1_inCountry WHERE {
> ?Event1 <http://jena.apache.org/spatial#withinCircle> (38.8633 -104.7919 700 'miles') .
> ?Event1 <http://issinc.com/test#inCountry> ?Event1_inCountry .
> ?Event1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://issinc.com/test#Event> .
> }
>
> If I move the spatial constraint further down the list, it fails:
>
> SELECT DISTINCT ?Event1 ?Event1_inCountry WHERE {
> ?Event1 <http://issinc.com/test#inCountry> ?Event1_inCountry .
> ?Event1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://issinc.com/test#Event> .
> ?Event1 <http://jena.apache.org/spatial#withinCircle> (38.8633 -104.7919 700 'miles') .
> }
>
> warning I see is:
> 10:04:58 WARN Fuseki :: [68] RC = 500 : Attempt to reassign '?Event1' from '<http://issinc.com/test#event_901112280020>' to '<http://issinc.com/test#event_901112280020>'
>
> thanks,
> -heidi
>
Re: Order of Spatial Constraints
Posted by Andy Seaborne <an...@apache.org>.
On 27/02/14 17:49, Heidi McClure wrote:
> After experimenting with the spatial constraints (like withinCircle), I've noticed that I must have the spatial constraint FIRST in my set of constraints. Is this by design?
Heidi,
The order of the execution greatly affects the speed of a query but it
should not the answers.
Which version are you running? It looks like JENA-549 which is fixed.
Andy
https://issues.apache.org/jira/browse/JENA-549
>
> If I do this query it works (withinCircle is first in my set of constraints):
>
> SELECT DISTINCT ?Event1 ?Event1_inCountry WHERE {
> ?Event1 <http://jena.apache.org/spatial#withinCircle> (38.8633 -104.7919 700 'miles') .
> ?Event1 <http://issinc.com/test#inCountry> ?Event1_inCountry .
> ?Event1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://issinc.com/test#Event> .
> }
>
> If I move the spatial constraint further down the list, it fails:
>
> SELECT DISTINCT ?Event1 ?Event1_inCountry WHERE {
> ?Event1 <http://issinc.com/test#inCountry> ?Event1_inCountry .
> ?Event1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://issinc.com/test#Event> .
> ?Event1 <http://jena.apache.org/spatial#withinCircle> (38.8633 -104.7919 700 'miles') .
> }
>
> warning I see is:
> 10:04:58 WARN Fuseki :: [68] RC = 500 : Attempt to reassign '?Event1' from '<http://issinc.com/test#event_901112280020>' to '<http://issinc.com/test#event_901112280020>'
>
> thanks,
> -heidi
>