You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2014/10/20 13:25:33 UTC
[jira] [Updated] (JENA-802) wrong identifiers returned by
spatial:nearby when using bnodes
[ https://issues.apache.org/jira/browse/JENA-802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andy Seaborne updated JENA-802:
-------------------------------
Description:
I had to use blank nodes for objects that do not have a public http uri. I imported a data set with geo:lat and geo:long coordinates in Fuseki 1.1.1 then I created the Lucence index as described in the doc about Jena Spatial. An example sub set I used is the following
{noformat}
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix airports_sc: <http://airports.dataincubator.org/schema/> .
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
_:node1 rdf:type airports_sc:LargeAirport ;
geo:lat "52.4539"^^xsd:float ;
geo:long "-1.74803"^^xsd:float ;
rdfs:label "Birmingham International Airport"
.
{noformat}
Then I run the following query
{noformat}
PREFIX spatial: <http://jena.apache.org/spatial#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT *
FROM <http://test.org/1/>
{
?airport spatial:nearby (52.45 -1.74 10 'km') .
?airport rdfs:label ?placeName .
}
{noformat}
The returned result was empty, then I removed the clause with the rdfs:label predicate and Fuseki returned a value for ?airport. This values is different from the bnode assigned by Fuseki during the import and that is why the above query returned no results.
was:
I had to use blank nodes for objects that do not have a public http uri. I imported a data set with geo:lat and geo:long coordinates in Fuseki 1.1.1 then I created the Lucence index as described in the doc about Jena Spatial. An example sub set I used is the following
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix airports_sc: <http://airports.dataincubator.org/schema/> .
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
_:node1 rdf:type airports_sc:LargeAirport ;
geo:lat "52.4539"^^xsd:float ;
geo:long "-1.74803"^^xsd:float ;
rdfs:label "Birmingham International Airport"
.
Then I run the following query
PREFIX spatial: <http://jena.apache.org/spatial#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT *
FROM <http://test.org/1/>
{
?airport spatial:nearby (52.45 -1.74 10 'km') .
?airport rdfs:label ?placeName .
}
The returned result was empty, then I removed the clause with the rdfs:label predicate and Fuseki returned a value for ?airport. This values is different from the bnode assigned by Fuseki during the import and that is why the above query returned no results.
> wrong identifiers returned by spatial:nearby when using bnodes
> --------------------------------------------------------------
>
> Key: JENA-802
> URL: https://issues.apache.org/jira/browse/JENA-802
> Project: Apache Jena
> Issue Type: Bug
> Components: Spatial
> Affects Versions: Fuseki 1.0.1, Fuseki 1.1.1
> Environment: Linux Ubuntu 12:10. JVM 1.7.0_09
> Reporter: Luigi Selmi
> Priority: Critical
>
> I had to use blank nodes for objects that do not have a public http uri. I imported a data set with geo:lat and geo:long coordinates in Fuseki 1.1.1 then I created the Lucence index as described in the doc about Jena Spatial. An example sub set I used is the following
> {noformat}
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
> @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
> @prefix airports_sc: <http://airports.dataincubator.org/schema/> .
> @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
> _:node1 rdf:type airports_sc:LargeAirport ;
> geo:lat "52.4539"^^xsd:float ;
> geo:long "-1.74803"^^xsd:float ;
> rdfs:label "Birmingham International Airport"
> .
> {noformat}
> Then I run the following query
> {noformat}
> PREFIX spatial: <http://jena.apache.org/spatial#>
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> SELECT *
> FROM <http://test.org/1/>
> {
> ?airport spatial:nearby (52.45 -1.74 10 'km') .
> ?airport rdfs:label ?placeName .
> }
> {noformat}
> The returned result was empty, then I removed the clause with the rdfs:label predicate and Fuseki returned a value for ?airport. This values is different from the bnode assigned by Fuseki during the import and that is why the above query returned no results.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)