sparqlunicorn / sparqlunicornGoesGIS

SPARQLing Unicorn QGIS Plugin (Documentation: https://sparqlunicorn.github.io/sparqlunicornGoesGIS/)
https://plugins.qgis.org/plugins/sparqlunicorn/
GNU General Public License v2.0
27 stars 6 forks source link

Properties scrambled in QGis layer #45

Open ldesousa opened 1 month ago

ldesousa commented 1 month ago

I am testing the features present in one of the KGs in my book: https://www.linked-sdi.com/gelderland

The KG is loaded into Virtuoso and is accessed by Unicorn through the SPARQL end-point. When I add the instances from one of the classes to the QGis canvas the results are like this:

UnicornBug_001

This is the feature retrieved for the gelre:geomMossel geometry. First, the geometry is not portrayed in the correct location, but rather where the gelre:geomRadioKotwijk geometry should be. The id given for the feature is not correct either, should be gelre:mossel.

If I query the triple store directly with:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
PREFIX geo: <http://www.opengis.net/ont/geosparql#> 
PREFIX gelre: <https://www.linked-sdi.com/gelderland#>

SELECT ?label ?geom ?wkt
WHERE {
    gelre:mossel geo:hasGeometry ?geom ;
                 rdf:label ?label .
    ?geom geo:asWKT ?wkt.
}

The result is:

label geom wkt
"Mossel"@en https://www.linked-sdi.com/gelderland#mosselGeom "POINT(5.7614399118364 52.062266156682)"^^http://www.opengis.net/ont/geosparql#wktLiteral

That is what should be associated with the gelre:geomMossel geometry. Note also the different coordinates. I suspects somewhere between the SPARQL query and portrayal some properties are getting scrambled.

situx commented 1 month ago

I can view your dataset and can parse it, but what is the address of your SPARQL endpoint? Is it public? Then I could test it myself

ldesousa commented 1 month ago

It is a local development instance. You can just load the file into a similar instance to try it.