opengeospatial / ogc-geosparql

Public Repository for the OGC GeoSPARQL Standards Working Group
78 stars 20 forks source link

Use Case ONTO16: Closest Coordinate #566

Open ar-chad opened 1 month ago

ar-chad commented 1 month ago

Use Case ONTO16

Closest Coordinate

As a GeoSPARQL data user I would like to retrieve coordinate of a geometry closest to a given point.

For the 'POINT(0 0 0)' and the 'POLYGON((2 2 0, 10 0 0, 10 5 0, 0 5 0, 2 2 0) the value is POINT('2 2 0').

Function signature:

closestCoordinate(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 coordinate function is discoverable.

Postconditions

A SPARQL query can be executed that includes a function to return closest coordinate of a given geometry to a given point. The results of the query are known to be true or false in 2D and 3D.

Steps

Actor: discovers closest coordinate function implemented by the system Actor: executes a SPARQL query containing closest coordinate function with a point and geometry arguments. System: returns a SPARQL result with a point that is a closest coordinate of a geometry to the given point.