Hello Yang,
thanks for your quick answer, I did this already and it worked with
fixed values in the query. But how can I make such a query with long.
and lat. from a source (e.g. long. and lat. from a person), not fixed
numbers?
Regards,
Florian
On 27.06.2015 23: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
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 :)