Hi Frans,

Virtuoso is not fully GeoSPARQL compliant and thus uses its own @prefix 
virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>  virtrdf:Geometry for the 
RDF geometry type, see:

        http://docs.openlinksw.com/virtuoso/rdfsparqlgeospat.html

So you can insert Mutlipolygons etc as:

SQL> ttlp ('@prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#> 
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> <point> geo:geometry 
"point(1.2 22.4)"^^virtrdf:Geometry .','xxx', 'graph');

Done. -- 1 msec.
SQL> ttlp ('@prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#> 
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> <point> geo:geometry 
"MULTIPOLYGON(((1 2, 6 1, 9 3, 3 6, 1 2)), ((4 9, 7 6, 9 8, 4 
9)))"^^virtrdf:Geometry .','xxx', 'graph');

Done. -- 2 msec.
SQL>
SQL> sparql select * from <graph> where {?s ?p ?o};
s                                                                               
  p                                                                             
    o
VARCHAR                                                                         
  VARCHAR                                                                       
    VARCHAR
_______________________________________________________________________________

http://xxx/point                                                                
  http://www.w3.org/2003/01/geo/wgs84_pos#geometry                              
    POINT(1.2 22.4)
http://xxx/point                                                                
  http://www.w3.org/2003/01/geo/wgs84_pos#geometry                              
    MULTIPOLYGON(((1.000000 2.000000,6.000000 1.000000,9.000000 
3.000000,3.000000 6.000000,1.000000 2.000000)),((4.000000 9.000000,7.000000 
6.000000,9.000000 8.000000,4.000000 9.000000)))

2 Rows. -- 2 msec.
SQL>

As said the full GeoSPARQL compliance is a work in progress which should soon 
be completed, although actually I found that the 
<http://www.opengis.net/ont/geosparql#wktLiteral> type being used in your 
example also works:

SQL> ttlp ('@prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#> 
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> <point> geo:geometry 
"MULTIPOLYGON(((1 2, 6 1, 9 3, 3 6, 1 2)), ((4 8, 7 6, 9 8, 4 
8)))"^^<http://www.opengis.net/ont/geosparql#wktLiteral> .','xxx', 'graph');

Done. -- 2 msec.
SQL> sparql select * from <graph> where {?s ?p ?o};                             
                                                                                
                                                                            s   
                                                                              p 
                                                                                
o
VARCHAR                                                                         
  VARCHAR                                                                       
    VARCHAR
_______________________________________________________________________________

http://xxx/point                                                                
  http://www.w3.org/2003/01/geo/wgs84_pos#geometry                              
    POINT(1.2 22.4)
http://xxx/point                                                                
  http://www.w3.org/2003/01/geo/wgs84_pos#geometry                              
    MULTIPOLYGON(((1.000000 2.000000,6.000000 1.000000,9.000000 
3.000000,3.000000 6.000000,1.000000 2.000000)),((4.000000 9.000000,7.000000 
6.000000,9.000000 8.000000,4.000000 9.000000)))
http://xxx/point                                                                
  http://www.w3.org/2003/01/geo/wgs84_pos#geometry                              
    MULTIPOLYGON(((1.000000 2.000000,6.000000 1.000000,9.000000 
3.000000,3.000000 6.000000,1.000000 2.000000)),((4.000000 8.000000,7.000000 
6.000000,9.000000 8.000000,4.000000 8.000000)))

3 Rows. -- 1 msec.
SQL> 

So, I don't get the error you report ie "Error 42000: [Virtuoso 
Driver][Virtuoso Server]RDFGE: rdf box with a geometry rdf type and a non 
geometry content" , thus how exactly are you performing your inserts ? If you 
can provide a example load that is failing that would be best ?

Note, I am using the following build from the git develop/7 branch:

SQL> status('');
REPORT
VARCHAR
_______________________________________________________________________________

OpenLink Virtuoso  Server
Version 07.10.3208-pthreads for Linux as of Mar 11 2014 
Started on: 2014-03-17 17:36 GMT+1

Best Regards
Hugh Williams
Professional Services
OpenLink Software, Inc.      //              http://www.openlinksw.com/
Weblog   -- http://www.openlinksw.com/blogs/
LinkedIn -- http://www.linkedin.com/company/openlink-software/
Twitter  -- http://twitter.com/OpenLink
Google+  -- http://plus.google.com/100570109519069333827/
Facebook -- http://www.facebook.com/OpenLinkSoftware
Universal Data Access, Integration, and Management Technology Providers

On 17 Mar 2014, at 14:30, Frans Knibbe | Geodan <frans.kni...@geodan.nl> wrote:

> Hello,
> 
> I have just installed Virtuoso Open Source 7.10.3208 and now I am 
> loading data from n-triples files. This goes well, until I get to the 
> geographical data. Then I get the following error:
> 
> *** Error 42000: [Virtuoso Driver][Virtuoso Server]RDFGE: rdf box with a 
> geometry rdf type and a non geometry content
> 
> The geometries in the file are multipolygons serialized as WKT by PostGIS.
> 
> An example of a geometry object:
> 
> "<http://www.opengis.net/def/crs/EPSG/0/28992> MULTIPOLYGON(((150874.3 
> 459500,150853.2 459477, {many more 
> coordinates})))"^^<http://www.opengis.net/ont/geosparql#wktLiteral>
> 
> for convenient reading I have replaced a long list of other coordinates 
> with {many more coordinates}.
> 
> What could be the problem in this case? Is it possible to get more 
> details on the error? From what I could find on the web, multipolygons 
> are supported in Virtuoso 7.1, as well as GeoSPARQL. The error seems to 
> indicate that the datatype (geosparql:wktLiteral) is recognized, but 
> that the literal does not comply.
> 
> Thanks in advance,
> 
> Frans Knibbe
> Geodan
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> _______________________________________________
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to