Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeoSPARQL query rewrite extension #460

Open
wants to merge 1 commit into
base: version4
Choose a base branch
from

Conversation

apano-on
Copy link
Contributor

This pull request provides a first implementation of the GeoSPARQL query rewrite extension (section 11 of the document).

All 4 scenarios are handled i.e.:
Feature-Feature
Feature-Geometry
Geometry-Feature
Geometry-Geometry

The implementation does not perform a check on whether a class is a subclass geo:Feature in the ontology, but applies a strict check on the object property geo:hasDefaultGeometry. The latter assumption can be relaxed or expanded in the code.
Beyond the core requirements of the GeoSPARQL standard, no additional features are implemented at this time. However, all topological functions are covered.

Via this implementation the query:

?geo1 geo:hasDefaultGeometry ?geom1 .
?geom1 geo:asWKT ?xWkt .
?geo2 geo:hasDefaultGeometry ?geom2 .
?geom2 geo:asWKT ?yWkt .
FILTER(geof:sfIntersects(?xWkt, ?yWkt)) .

can be shortened to

?geo1 geo:sfIntersects ?geo2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants