Dear mailing list,

I'm very excited of the new geo support that comes with Virtuoso 7.1 !

I'm trying to implement exactly the geosparql example found at [1] (at
pages 16-20). In short, they create two geofeatures, and then run a query
to select features contained in other features (monuments in parks).

I got no result using their ns3/sparql (which I think is normal since I
read somewhere that virtuoso doesn't use the standard geosparql
ontologies). So I've looked at virtuoso's tutorial [2] and at the
documentation [3] to try to adapt the example so that it works on Virtuoso
7.1 opensource.

You'll find adapted (and simplified) N3 data and Sparql query below. The
goal is to return WashgintonMonument, which lies in the park, but no
NewYorkMonument, which is outside.

But when I try to use bif:st_intersects, I get this error : *Virtuoso S0002
Error SQ200: No table rdf_obj*

Am I missing a step ?

Thanks you very much !

Best regards,

Olivier


[1] :
http://www.ssec.wisc.edu/meetings/geosp_sem/presentations/GeoSPARQL_Getting_Started%20-%20KolasWorkshop%20Version.pdf
[2] :
http://virtuoso.openlinksw.com/tutorials/sparql/SPARQL_Tutorials_Part_11/SPARQL_Tutorials_Part_11.html#(1)
[3] : http://docs.openlinksw.com/virtuoso/rdfsparqlgeospat.html


*A. The N3 Data*

 #Ontology
>
>
>> @prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#> .
>
> @prefix owl: <http://www.w3.org/2002/07/owl#> .
>
> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
>
> @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
>
> @prefix : <http://dhlabpc2.epfl.ch/OntoWiki/vtm_geoexample2/> .
>
>
>> :Park                   a                   owl:Class;
>
>                         rdfs:subClassOf     :PointOfInterest .
>
>
>> :Monument               a                   owl:Class;
>
>                         rdfs:subClassOf     :PointOfInterest .
>
>
>> :PointOfInterest        a                   owl:Class;
>
>                         rdfs:subClassOf     geo:Feature .
>
>
>
> # Instances
>
>
>> :WashingtonMonument             a                   :Monument;
>
>                                 rdfs:label          "Washington Monument";
>
>                                 geo:geometry        "POINT(5
>> 5)"^^virtrdf:Geometry .
>
>
>>
>> :NewYorkMonument                a                   :Monument;
>
>                                 rdfs:label          "New York Monument";
>
>                                 geo:geometry        "POINT(15
>> 15)"^^virtrdf:Geometry .
>
>
>> :NationalMall                   a                   :Park;
>
>                                 rdfs:label          "National Mall";
>
>                                 geo:geometry        "POLYGON((0 0,  10 0,
>>  10 10,  0 10,  0 0))"^^virtrdf:Geometry .
>
>
*B. The SPARQL Query*

PREFIX virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
>
> PREFIX owl: <http://www.w3.org/2002/07/owl#>
>
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
>
> PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
>
> PREFIX : <http://dhlabpc2.epfl.ch/OntoWiki/vtm_geoexample2/>
>
>
>
> SELECT ?m ?p
>
> WHERE {
>
>
>>         ?m          a                   :Monument ;
>
>                     geo:geometry        ?mgeo .
>
>
>>         ?p          a                   :Park ;
>
>                     geo:geometry        ?pgeo .
>
>
>>         FILTER (bif:st_intersects (?mgeo, ?pgeo)) #this line makes the
>> query bug
>
> }
>
>
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to