openlink / virtuoso-opensource

Virtuoso is a high-performance and scalable Multi-Model RDBMS, Data Integration Middleware, Linked Data Deployment, and HTTP Application Server Platform
http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/
Other
849 stars 214 forks source link

Geospatial features in 7.2.6 not working as expected #866

Open rapw3k opened 4 years ago

rapw3k commented 4 years ago

Hi! I downloaded 7.2.6 to test new geospatial features: https://sourceforge.net/projects/virtuoso/files/virtuoso/7.2.6-dev/

The new version was installed in new server, and the databases files from previous instance (7.2.4) were copied to the new server database directory, including virtuoso.ini. virtuoso.ini.zip

Then the server started and seems ok.

However, I found already few issues:

Am I missing some change in configuration file? You can see the new endpoint at: https://www.foodie-cloud.org/sparql

[1]

PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
PREFIX virtrdf: <http://www.openlinksw.com/schemas/virtrdf#> 
PREFIX poi: <http://www.openvoc.eu/poi#> 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX otm: <http://w3id.org/foodie/otm#>

SELECT DISTINCT ?Resource, ?Label, bif:st_astext(?coordinatesPOIa) as ?coordinatesPOI
FROM <http://www.sdi4apps.eu/poi.rdf>
WHERE {
  ?Resource a <http://gis.zcu.cz/SPOI/Ontology#lodging> .
  ?Resource rdfs:label ?Label .
  ?Resource geo:asWKT ?coordinatesPOIa .
  FILTER(bif:st_within(?coordinatesPOIa,bif:st_geomFromText(?coordinatesOTM),0.00045)) .
  {
    SELECT bif:st_astext(?x) as ?coordinatesOTM
    FROM <http://w3id.org/foodie/otm#>
    WHERE {
      ?roadlink a otm:RoadLink .
      ?roadlink otm:roadName ?name.
      ?roadlink otm:functionalRoadClass ?class.
      ?roadlink otm:centerLineGeometry ?geometry .
      ?geometry geo:asWKT ?x .
      FILTER(bif:st_intersects (?x, bif:st_geomFromText("POLYGON((14.426647 50.0751251,14.426647 50.07685089,14.43054696 50.07685089,14.43054696 50.0751251,14.426647 50.0751251))"))) .
      FILTER(STRSTARTS(STR(?class),"firstClass") ) .
    }
  }
}
rapw3k commented 4 years ago

Hi, The first issue I was because I was not loading the plugins in virtuoso.ini related to geospatial features (as I was using old virtuoso.ini). Second issue is still open, if you have any insights, thanks.