On 27/06/15 22:55, Yang Yuanzhe wrote:

Hi Florian,

Can you please try spatial:nearby instead of spatial:query? I think the
example code is out of date.

Regards,
Yang

Documentation (in staging) has now been fixed

        Andy




On 06/27/2015 11:37 PM, Florian Beckh wrote:
Hello everyone,


I'm currenty trying to generate a query with jena spatial
(https://jena.apache.org/documentation/query/spatial-query.html)

|PREFIX spatial:  <http://jena.apache.org/spatial#>
PREFIX rdfs:  <http://www.w3.org/2000/01/rdf-schema#>

SELECT  ?placeName
{
    ?place spatial:query(51.46  2.6  10  'km')  .
    ?place rdfs:label?placeName
}|

The example shows a fixed lat/lon to work with. I want to query a
variable position given by some position values (e.g of a person):

|PREFIX spatial:  <http://jena.apache.org/spatial#>
PREFIX rdfs:  <http://www.w3.org/2000/01/rdf-schema#>
PREFIX geo:  <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX person:  <http://example.org/person#>

SELECT  ?placeName
{
    ?person geo:lat?lat.
    ?person geo:long?long.      ?place spatial:query(?lat?long10 'km')  .
    ?place rdfs:label?placeName
    FILTER(?person=  person:testPerson1)  }|

The second statement does not work and is only an indicator to what i
mean.

The question is: how can I do that?


Ty., greetings :)








Reply via email to