Description
Use Case ONTO17
Closest Point
As a GeoSPARQL data user I would like to retrieve the first found closest point of a geometry to a given geometry.
For the 'POINT(5 7 0)'
and the 'POLYGON(0 0 0, 10 0 0, 10 5 0, 0 5 0, 0 0 0)'
the value is 'POINT(5 5 0)'
.
In case of many closest points, possibly infinite, the first found is returned:
i.e. for the 'POLYGON(0 0 0, 10 0 0, 10 5 0, 0 5 0, 0 0 0)'
and the 'POLYGON(13 2 0, 15 0 0, 13 4 0, 13 2 0)'
the value is either 'POINT(10 2 0)'
or 'POINT(10 4 0)'
Function signature:
closestPoint(geometry: ogc:geomLiteral, geometry: ogc:geomLiteral): geometry: ogc:geomLiteral
Actor: GeoSPARQL data user (human or software agent querying RDF dataset with GeoSPARQL)
Preconditions
Features and Geometries with 2D and 3D representations are present in a dataset to be queried. The closest point function is discoverable.
Postconditions
A SPARQL query can be executed that includes a function to return closest point of a given geometry to a given geometry. The results of the query are known to be true or false in 2D and 3D.
Steps
Actor: discovers closest point function implemented by the system
Actor: executes a SPARQL query containing closest point function with two geometry arguments.
System: returns a SPARQL result with a point that is a first found closest point of a first geometry to the second geometry.
Activity