LorenzBuehmann commented on issue #1953:
URL: https://github.com/apache/jena/issues/1953#issuecomment-1630187850

   I'm pretty sure that GeoSPARQL isn't part of the default Fuseki distribution 
yet, only the text index is there as an extension. I think I mentioned it some 
time ago, but forgot to keep track of it:
   
   
https://github.com/apache/jena/blob/main/jena-fuseki2/jena-fuseki-server/pom.xml
   
   Regarding the confusion, the TE wants to use GeoSPARQL features with 
`tdbquery`, but this doesn't work at the moment. Adding a `jena-geosparql` Uber 
Jar to the classpath or use tdbquery from the Fuseki fulljar (once 
`jena-geosparql` has been added) will at least make the functions and datatypes 
being registered and work:
   
   ```
   java -cp /tmp/jena-fuseki-fulljar-4.9.0.jar tdb2.tdbquery --loc /tmp/tdb2 '
   
   PREFIX geo:  <http://www.opengis.net/ont/geosparql#>
   PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
   PREFIX uom: <http://www.opengis.net/def/uom/OGC/1.0/>
   
   SELECT * {
   BIND("POINT(1.0 1.0)"^^geo:wktLiteral AS ?p1)
   BIND("POINT(2.0 2.0)"^^geo:wktLiteral AS ?p2)
   BIND(geof:distance(?p1, ?p2, uom:radian) AS ?d)
   }'
   07:53:56 WARN  system          :: The “SIS_DATA” environment variable is not 
set.
   
------------------------------------------------------------------------------------
   | p1                               | p2                               | d    
      |
   
====================================================================================
   | "POINT(1.0 1.0)"^^geo:wktLiteral | "POINT(2.0 2.0)"^^geo:wktLiteral | 
0.024683e0 |
   
------------------------------------------------------------------------------------
   ```
   
   
   What does not work is probably using a `GeosparqlDataset` in an assembler 
file because from what I remember when looking at the code some time ago, 
`tdbquery` only considers a TDBDataset?
   
   So my guess once you added a full jar of `jena-geosparql` (needs Maven shade 
plugin), the GeoSPARQL functions will work because they are registered via 
service loader, but the spatial index I guess won't as this is part of the 
`GeosparqlDataset`  which registers the index to the query context on 
initialization.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to