opengeospatial / ogc-geosparql

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

Use Case ONTO15: Azimuth #565

Open ar-chad opened 1 month ago

ar-chad commented 1 month ago

Use Case ONTO15

Azimuth

As a GeoSPARQL data user I would like to retrieve azimuth of a segment from pointA to pointB clockwise from the North (0, 1), in radians.

For the 'POINT(0 1)', 'POINT(10 1)' the value is '1.5707963267948966' which is 90˚. Does not return any value if geometries are not points.

Function signature:

azimuth(geometry1: ogc:geomLiteral, geometry2: ogc:geomLiteral): xsd:double

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 azimuth function is discoverable.

Postconditions

A SPARQL query can be executed that includes a function to return azimuth of a segment from pointA to pointB clockwise from the North (0, 1) or no value if the any of geometries is not a point. The results of the query are known to be true or false in 2D or 3D.

Steps

Actor: discovers azimuth function implemented by the system Actor: executes a SPARQL query containing azimuth function with exactly two geometries as arguments. System: returns a SPARQL result with azimuth of a segment from geometry1 to geometry2 clockwise from the North (0, 1), in radians or no value if any of geometries is not a point.