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
<[email protected]> 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

Reply via email to