virtuoso-opensource
virtuoso-opensource copied to clipboard
rdf box with a geometry rdf type and a non geometry content
Hi. On Virtuoso version 07.10.3209 on Win64 (x86_64-generic-win-64), Single Server Edition
, I'm trying to insert a triple with a multipolygon but I get the following error:
Virtuoso 42000 Error RDFGE: rdf box with a geometry rdf type and a non geometry content
This is the triple I'm trying to insert:
prefix ogcgeo: <http://www.opengis.net/ont/geosparql#>
prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
INSERT {<IRI> ogcgeo:Geometry "MULTIPOLYGON (((106771.31560000032 6608781.5888, 106772.99890000001 6608782.2895, 106778.38410000037 6608786.4284000006, 106779.88439999986 6608788.3892999999, 106780.2296000002 6608789.3066000007, 106780.45320000034 6608790.7879000008, 106780.29349999968 6608792.409, 106779.59210000001 6608794.0921, 106775.55119999964 6608799.3373000007, 106773.58999999985 6608800.8367999997, 106772.6727 6608801.1820999999, 106771.19149999972 6608801.4050999992, 106769.57039999962 6608801.2454000004, 106767.88779999968 6608800.5436000004, 106762.52249999996 6608796.4026999995, 106761.02390000038 6608794.4425000008, 106760.67860000022 6608793.5252, 106760.4550999999 6608792.0454999991, 106760.61479999963 6608790.4243999999, 106761.31479999982 6608788.7424999997, 106765.3356999997 6608783.4991999995, 106766.48560000025 6608782.4995000008, 106767.59420000017 6608781.8635000009, 106768.53210000042 6608781.5789999999, 106770.0214999998 6608781.4184000008, 106771.31560000032 6608781.5888)))"^^virtrdf:Geometry . }
Any thoughts?
Follow up. Inserting a single point works fine:
prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
INSERT { <URI> geo:geometry "POINT(59.4312 8.06013)"^^virtrdf:Geometry . }
There have been geospatial fixes since the 3209
build on Windows from April.
Are you able to compile the latest develop/7
branch on Linux as detailed in the README and test to see if the problem persists?
A Windows build can be challenging to compile, hence we provide pre-built binaries for it ...
I will try to set up a Linux version, currently I'm only working with points and I've come across another issue. Following the Geo Spatial tutorial, I'm trying to find points within a polygon. I have multiple triples with geo:geometry points like this:
prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
<IRI1> geo:geometry "POINT(9.06367 59.4042)"^^<http://www.openlinksw.com/schemas/virtrdf#Geometry>
<IRI2> geo:geometry "POINT(8.95043 59.3732)"^^<http://www.openlinksw.com/schemas/virtrdf#Geometry>
And I'm trying to locate them with the following query:
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
SELECT ?href ?label ?geometry
WHERE {
?href a ?type ;
rdfs:label ?label;
geo:geometry ?geometry .
FILTER(bif:st_intersects(?geometry, bif:st_geomfromtext("POLYGON((8.980324538424611 59.5343180010956,8.749611647799611 59.44088604851968,8.870461257174611 59.32057916932128,9.233010085299611 59.29955167361263,9.504921706393361 59.366793908532124,9.243996413424611 59.54824090473033))")))
} LIMIT 50
Although the points are within the polygon, this query returns 0 results. I don't receive any errors, so I don't think this is a syntax issue. Do I need to save the points in a different format or is it a query issue?
If you are going to rebuild on Linux using the latest develop/7
git repo, then please retest this issue against this version, to see if the problem is fixed, as there have been a number of geospatial fixes ...
Follow up on this @HughWilliams: I installed the develop/7
, version: 07.20.3212
, build: Mar 12 2015
on Ubuntu 14.04 and now the queries for a Point geometry within a polygon is working as expected!
However, when I try to insert a MultiPolygon in the triple store I get the following error:
Virtuoso 22023 Error GEO11: The point coordinates are spherical degrees and the longitude is out of range -270..450
I'm trying to insert the following triple:
prefix ogcgeo: <http://www.opengis.net/ont/geosparql#>
prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
INSERT {<URI> ogcgeo:Geometry "MULTIPOLYGON (((106771.31560000032 6608781.5888, 106772.99890000001 6608782.2895, 106778.38410000037 6608786.4284000006, 106779.88439999986 6608788.3892999999, 106780.2296000002 6608789.3066000007, 106780.45320000034 6608790.7879000008, 106780.29349999968 6608792.409, 106779.59210000001 6608794.0921, 106775.55119999964 6608799.3373000007, 106773.58999999985 6608800.8367999997, 106772.6727 6608801.1820999999, 106771.19149999972 6608801.4050999992, 106769.57039999962 6608801.2454000004, 106767.88779999968 6608800.5436000004, 106762.52249999996 6608796.4026999995, 106761.02390000038 6608794.4425000008, 106760.67860000022 6608793.5252, 106760.4550999999 6608792.0454999991, 106760.61479999963 6608790.4243999999, 106761.31479999982 6608788.7424999997, 106765.3356999997 6608783.4991999995, 106766.48560000025 6608782.4995000008, 106767.59420000017 6608781.8635000009, 106768.53210000042 6608781.5789999999, 106770.0214999998 6608781.4184000008, 106771.31560000032 6608781.5888)))"^^virtrdf:Geometry . }
Do I have to convert the point coordinates to a specific system before inserting them?
@havardl : I have been able to recreate and reported to development to look into ...
@HughWilliams : Thanks for looking into it. In the meantime, I was able to insert coordinates using the corresponding WGS84 geo spatial reference system. However, trying to query for a triple that both has a geometry point and multipolygon I get the following error:
Virtuoso S0002 Error SQ200: No table rdf_obj
prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
prefix ogcgeo: <http://www.opengis.net/ont/geosparql#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?href ?label ?point ?multipolygon
WHERE {
?href a ?type ;
rdfs:label ?label ;
geo:geometry ?point ;
ogcgeo:Geometry ?multipolygon .
FILTER(bif:st_intersects(?multipolygon, bif:st_geomfromtext("MULTIPOLYGON(((8.980324538424611 59.5343180010956,8.749611647799611 59.44088604851968,8.870461257174611 59.32057916932128,9.233010085299611 59.29955167361263,9.504921706393361 59.366793908532124,9.243996413424611 59.54824090473033)))")))
} LIMIT 50
The error persists even though I change the bif:st_intersects
to look for the point, and not the multipolygon geometry. When I remove the reference to the multipolygon geometry in the query, I get the triples that are located within the multipolygon area.
Both the point and multipolygon are saved as a http://www.openlinksw.com/schemas/virtrdf#Geometry type.
Is this an issue with how the triples are saved, or should i construct the query in a different manner?
Hi, I'm trying to set up a local Wikidata instance with the dump available at https://dumps.wikimedia.org/wikidatawiki/entities/latest-all.ttl.gz using Virtuoso Open Source version 7.2.5. I'm using the bulk loader to do that. However, I get a "RDFGE: RDF box with a geometry RDF type and a non-geometry content" error while doing that. Does anyone knows what is wrong? Please, find the screenshot of the error attached.
@ltmartin
Some causes of the reported error text were resolved in code that was merged after v7.2.5.
Is it possible for you to reattempt this data load with a Virtuoso you build from the latest develop/7
branch (recommended)?
Or a pre-built-binary of the soft-released 7.2.6-dev (less likely to resolve, but still possible)?
I can confirm that as of today it is still not possible to load Wikidata
into virtuoso-opensource
for the reason mentioned above ( RDFGE: rdf box with a geometry rdf type and a non geometry content
). I tried with the latest development version (commit hash 91f71b07d728697a6da0b6ccc74311da6e97e983
) .
@joka921 -- Please try following the steps outlined in this article, and follow up there if you still see issues with the geodata.