Thanks again for your response,
I have the following insert query:
prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
prefix person: <http://example.org/person#>
INSERT DATA {
person:testPerson1 person:name "Max Muster" .
person:testPerson1 geo:lat 51.46 .
person:testPerson1 geo:long 2.6 .
}
If I execute the Spatial-Query, I get the following error (and the
result is empty):
"WARN SpatialOperationWithCircleBase :: Latitude is not a literal
[?lat, ?long, "10"^^http://www.w3.org/2001/XMLSchema#integer, "km"]"
Regards,
Florian
On 28.06.2015 01:14, Yang Yuanzhe wrote:
Hi Florian,
Then I get confused. I tried your second query and it works fine for
me. Did you get any error message?
Regards,
Yang
On 06/28/2015 12:13 AM, Florian Beckh wrote:
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 :)