streamreasoning / rsp4j

RSP4J a library for RDF Stream Processing
Apache License 2.0
31 stars 12 forks source link

Support of GeoSPARQL #22

Open Inexpugnable opened 2 years ago

Inexpugnable commented 2 years ago

Hi,

We have a use case where we use geospatial coordinates and as such I was wondering if you support functions like those of GeoSPARQL (the basic SPARQL engine is not designed to calculate trigonometric functions)?

If not, it seems that you are working with JENA and maybe this module could be not too difficult to integrate: https://jena.apache.org/documentation/geosparql/index.html

Best,

pbonte commented 2 years ago

Hi,

Indeed C-SPARQL2.0 uses Jena, so you could extend it for GeoSPARQL queries. A few years back, a colleague of mine extended the CSPARQL1.0 engine for geosparql support, perhapse you can find some clues in his paper.

Don't hesitate to send a pull request when you were able to do the extension. At this moment I don't have the bandwidth to implement it myself, but I can review the code.

KR, Pieter

Inexpugnable commented 2 years ago

The second link does not lead to the right destination.

But I think with your indications that you wanted to talk about this article and this branch:

I will try to look at this issue, once I have a proper work environment.

Inexpugnable commented 2 years ago

I have been looking more closely at the implementation of this feature by following the work of your colleague, and I have to say that it is not so straightforward. CSPARQL's sources have changed a lot between the new version and the first one, and he was actually replacing JENA's engine with the Parliament engine (version 2.7.10 at the time).

https://github.com/SemWebCentral/parliament/tree/master

pbonte commented 2 years ago

Hi,

I think you can create a version with parliament by updating this class: https://github.com/streamreasoning/rsp4j/blob/master/csparql2/src/main/java/org/streamreasoning/rsp4j/csparql2/engine/JenaContinuousQueryExecution.java This is where the data is retrieved from the window operators and added to Jena. I think you can do the same thing but provide thee data to Parliament instead.

However, I think it is easier to include the Jena extension for GeoSPARQL (jena-geosparql), then not too much needs to be changed I would think.