Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

GeoSPARQL query

joguerraSep 5 2014 — edited Sep 12 2014

Hi,

I've just to start to make queries in the database using the GeoSPARQL vocabulary and I am wondering whether there is something missing/wrong in this query:

PREFIX dc:<http://purl.org/dc/elements/1.1/>

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 owl:   <http://www.w3.org/2002/07/owl#>

PREFIX fn:<http://www.w3.org/2005/xpath-functions#>

PREFIX ouext: <http://oracle.com/semtech/jena-adaptor/ext/user-def-function#>

PREFIX oext:  <http://oracle.com/semtech/jena-adaptor/ext/function#>

PREFIX astro: <http://www.tng.iac.es/ontologies/2014/6/starguidecatalog#>

PREFIX geo:   <http://www.opengis.net/ont/geosparql#>

PREFIX geof: <http://www.opengis.net/def/function/geosparql/>

PREFIX ORACLE_SEM_FS_NS: <http://oracle.com/semtech#timeout=100,qid=123>

SELECT ?name ?fWKT

WHERE { ?name astro:hasAstronomicalPoint ?point .

?point geo:asWKT ?fWKT .

FILTER (geof:sfWithin(?fWKT, "Polygon (0.0 0.0, 10.0 0.0, 10.0 0.1, 0.0 0.1)"^^geo:wktLiteral))

}

LIMIT 10

The query is based on the ontology described on this thread (Oracle semantic tech inference + Protege plugin). Basically, it's a simple thing. I just want to pull out the names within a box defined by the Polygon. Can anybody point out whether it is correct? I got an internal error from Joseki server (HTTP Status 500 - Unknown error)

Thanks & Cheers

This post has been answered by joguerra on Sep 12 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 10 2014
Added on Sep 5 2014
12 comments
3,978 views