You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Ying Jiang <jp...@gmail.com> on 2013/12/01 09:19:42 UTC
Re: spatial query
Hi,
I've made an example in the tests of jena-spatial. Please update the
code in jena trunk and try out the test:
AbstractTestIsNearByPF.testLatLongBound()
https://svn.apache.org/repos/asf/jena/trunk/jena-spatial/src/test/java/org/apache/jena/query/spatial/pfunction/AbstractTestIsNearByPF.java
It works well with the following query:
----
PREFIX : <http://example.org/data/resource/>
SELECT ?s
WHERE {
:center geo:lat ?lat .
:center geo:long ?long .
?s spatial:nearby (?lat ?long 100.0 'miles' -1) .
}
----
Best regards,
Ying Jiang
On Thu, Nov 28, 2013 at 10:58 AM, Elli Schwarz
<el...@yahoo.com> wrote:
> In the latest Fuseki 1.0.0 release, I've been experimenting with the new jena-spatial component. I noticed that if I try to run this query:
>
> SELECT ?place
> {
>
> ?place geo:lat ?lat;
> geo:long ?long.
> ?place spatial:nearby (?lat ?long 10 'mi') . #this doesn't work - error message that Latitude is not a literal
>
> }
>
> I get an error message that Latitude is not a literal. It appears that the function is run before the variable is bound to a result. Is that the expected behavior? Is there a way to have the function run on the binding?
>
> Thanks for adding this new spatial feature!
>
> -Elli