openlink / virtuoso-opensource

Virtuoso is a high-performance and scalable Multi-Model RDBMS, Data Integration Middleware, Linked Data Deployment, and HTTP Application Server Platform
https://vos.openlinksw.com
Other
867 stars 210 forks source link

Geosparql insert query : RDF box with a geometry RDF type and a non-geometry content #1307

Closed nbittich closed 4 months ago

nbittich commented 4 months ago

While trying to insert a geo:Geometry with a custom coordinate reference system, Virtuoso returns the following error: Virtuoso 42000 Error RDFGE: RDF box with a geometry RDF type and a non-geometry content

This problem seems to be related to issue #1274.

The same query seems working fine using a different engine like TDB2.

Virtuoso version: 07.20.3240 (commit: a1fd8195bf1140797fefb7d0961c55739c0dd0d8)

The problematic query:

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

INSERT DATA {
    GRAPH <http://g> {
        <http://a> a geo:Geometry ;
        geo:asWKT "<www.opengis.net/def/crs/EPSG/0/31370> POINT (155822.2 132723.18)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> .
    }
}
imitko commented 4 months ago

@nbittich

I guess you have missed http scheme in the SRID IRI

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

INSERT DATA {
    GRAPH <http://g> {
        <http://a> a geo:Geometry ;
        geo:asWKT "<http://www.opengis.net/def/crs/EPSG/0/31370> POINT (155822.2 132723.18)"^^<http://www.opengis.net/ont/geosparql#wktLiteral> .
    }
}

HTH

TallTed commented 4 months ago

To make the needed change more obvious...

geo:asWKT "<www.opengis.net/

should be

geo:asWKT "<http://www.opengis.net/
nbittich commented 4 months ago

that was it! Thanks a lot and sorry for this typo, I would make sure to check more carefully before opening an issue next time.