This project will implement support for GeoSPARQL in KiWi, inspired by MARMOTTA-584. Further details at https://www.google-melange.com/gsoc/project/details/google/gsoc2015/fernandobac03/5707702298738688
Original code at https://github.com/cuent/marmotta/tree/MARMOTTA-584, patch is being integrated at branch MARMOTTA-584.
The OGC GeoSPARQL standard supports representing and querying geospatial data on the Semantic Web. GeoSPARQL defines a vocabulary for representing geospatial data in RDF, and it defines an extension to the SPARQL query language for processing geospatial data. In addition, GeoSPARQL is designed to accommodate systems based on qualitative spatial reasoning and systems based on quantitative spatial computations. Source : http://www.opengeospatial.org/standards/geosparql here
Here is a list of GeoSPARQL functions that are implemented on KiWi:
|
|
SF FUNCTIONS |
|
|
|
FUNCTION |
TYPE |
DESCRIPTION |
STATUS |
SYNTAX |
VIEW |
INTERSECTS |
Boolean |
Returns TRUE if geom1 intersect with geom2 geometry |
Implemented |
geof:sfIntersects(?geom1, ?geom2) |
|
WITHIN |
Boolean |
Returns TRUE if geom1 is completely inside geom2 |
Implemented |
geof:sfWithin(?geom1, ?geom2) |
|
CONTAINS |
Boolean |
Returns TRUE if and only if no points of geom2 lie in the exterior of geom1, and at least one point of the interior of geom2 lies in the interior of geom1. |
Implemented |
geof:sfContains(?geom1, ?geom2) |
|
OVERLAPS |
Boolean |
Returns TRUE if the Geometries share space, are of the same dimension, but are not completely contained by each other. |
Implemented |
geof:sfOverlaps(?geom1, ?geom2) |
|
TOUCHES |
Boolean |
Returns TRUE if the geometries have at least one point in common, but their interiors do not intersect. |
Implemented |
geof:sfTouches(?geom1, ?geom2) |
|
EQUALS |
Boolean |
Returns TRUE if the given geometries represent the same geometry |
Implemented |
geof:sfEquals(?geom1, ?geom2) |
|
DISJOINT |
Boolean |
Returns TRUE if the Geometries do not "spatially intersect" - if they do not share any space together. |
Implemented |
geof:sfDisjoint(?geom1, ?geom2) |
|
CROSSES |
Boolean |
Returns TRUE if the supplied geometries have some, but not all, interior points in common. |
Implemented |
geof:sfCrosses(?geom1, ?geom2) |
|
|
|
NON TOPOLOGICAL FUNCTIONS |
|
|
|
INTERSECTION |
Geometry |
Returns a geometry that represents the shared portion of geom1 and geom2. |
Implemented |
geof:intersection(?geom1, ?geom2) |
|
CONVEXHULL |
Geometry |
The convex hull of a geometry represents the minimum convex geometry that encloses all geometries within the set. |
Implemented |
geof:convexHull(?geom1) |
|
BUFFER |
Geometry |
This function returns a geometric object that represents all Points whose distance from geom1 is less than or equal to the radius measured in units. |
Implemented |
geof:buffer(?geom1, radius, units:anyUnit) |
|
DISTANCE |
Geometry |
Returns the shortest distance in units between any two Points in the two geometric objects. |
Implemented |
geof:distance(?geom1, ?geom2,units:anyUnit) |
|
BOUNDARY |
Geometry |
This function returns the closure of the boundary of geom1. |
Implemented |
geof:boundary(?geom1) |
|
DIFFERENCE |
Geometry |
This function returns a geometric object that represents all Points in the set difference of geom1 with geom2. |
Implemented |
geof:difference (geom1, geom2) |
|
ENVELOPE |
Geometry |
This function returns the minimum bounding box of geom1 |
Implemented |
geof:envelope (geom1) |
|
RELATE |
Boolean |
Returns true if the spatial relationship between geom1 and geom2 corresponds to one with acceptable values for the specified pattern-matrix. Otherwise, this function returns false. Pattern-matrix represents a DE-9IM intersection pattern consisting of T (true) and F (false) values. |
Implemented |
geof:relate(geom1, geom2, pattern-matrix) |
|
SYM DIFFERENCE |
Geometry |
This function returns a geometric object that represents all Points in the set symmetric difference of geom1 with geom2. |
Implemented |
geof:symDifference(geom1, geom2) |
|
UNION |
Geometry |
This function returns a geometric object that represents all Points in the union of geom1 with geom2. |
Implemented |
geof:union(geom1, geom2) |
|
getSRID |
INT |
Returns the spatial reference system URI for geom |
Implemented |
geof:getSRID (geom) |
|
|
|
EH FUNCTIONS |
|
|
|
EQUALS |
Boolean |
Returns TRUE if the given geometries represent the same geometry |
Implemented |
geof:ehEquals(geom1, geom2) |
|
DISJOINT |
Boolean |
Returns TRUE if the Geometries do not "spatially intersect" - if they do not share any space together. |
Implemented |
geof:ehDisjoint(geom1, geom2) |
|
MEET |
Boolean |
Returns TRUE if the geometries have at least one point in common, but their interiors do not intersect. |
Implemented |
geof:ehMeet(geom1, geom2) |
|
OVERLAP |
Boolean |
Returns TRUE if the Geometries share space, are of the same dimension, but are not completely contained by each other. |
Implemented |
geof:ehOverlap(geom1, geom2) |
|
COVERS |
Boolean |
Exists if the subject spatialObject spatially covers the object spatialObject. DE-9IM: T*TFT*FF*. |
Implemented |
geof:ehCovers(geom1, geom2) |
|
COVERED BY |
Boolean |
Exists if the subject spatialObject is spatially covered by the object spatialObject. DE-9IM: TFF*TFT**. |
Implemented |
geof:ehCoveredBy(geom1, geom2) |
|
INSIDE |
Boolean |
Exists if the subject spatialObject is spatially inside the object spatialObject. DE-9IM: TFF*FFT**. |
Implemented |
geof:ehInside(geom1, geom2) |
|
CONTAINS |
Boolean |
Exists if the subject spatialObject spatially contains the object spatialObject. DE-9IM: T*TFF*FF*. |
Implemented |
geof:ehContains(geom1, geom2) |
|
|
|
RCC FUNCTIONS |
|
|
|
EQUALS |
Boolean |
Returns TRUE if the given geometries represent the same geometry |
Implemented |
geof:rcc8eq(geom1, geom2) |
|
DISCONNECTED |
Boolean |
Returns TRUE if the Geometries do not "spatially intersect" - if they do not share any space together. |
Implemented |
geof:rcc8dc(geom1, geom2) |
|
EXTERNALLY CONNECTED |
Boolean |
Returns TRUE if the geometries have at least one point in common, but their interiors do not intersect. |
Implemented |
geof:rcc8ec(geom1, geom2) |
|
PARTIALLY OVERLAPPING |
Boolean |
Returns TRUE if the Geometries share space, are of the same dimension, but are not completely contained by each other. |
Implemented |
geof:rcc8po(geom1, geom2) |
|
TANGENTIAL PROPER PART |
Boolean |
Returns true if geom1 is within geom2 and their borders touches in almost one point |
Implemented |
geof:rcc8tpp(geom1, geom2) |
|
TANGENTIAL PROPER PART INVERSE |
Boolean |
Returns true if geom1 contains geom2 and their borders touches in almost one point |
Implemented |
geof:rcc8tppi(geom1, geom2) |
|
NON- TANGENTIAL PROPER PART |
Boolean |
Returns true if geom 1 is within geom 2 and their borders doesn't touches in almost one point |
Implemented |
geof:rcc8ntpp(geom1, geom2) |
|
NON- TANGENTIAL PROPER PART INVERSE |
Boolean |
Returns true if geom1 contains geom2 and their borders doesn't touch in any point |
Implemented |
geof:rcc8ntppi(geom1, geom2) |
|