Open ar-chad opened 3 weeks ago
Thanks for the ticket. Is there also demand for a function to flip other axis? X and Z axis for instance?
Yes, definitely it would be good to cover flipping on the other axes as well.
I can either add them separately or we could generalise this function. What do you think will be better?
I guess this could be rephrased as a 90d rotation around an axis followed by mirroring. Maybe that could also be a way to generalize this even further?
@aothms rotation with mirroring looks like a more general function, which could be added separately to the simpler ones (90 degree, specifically), or as a general replacement of them.
Use Case ONTO19
Flip Coordinates
As a GeoSPARQL data user I would like to retrieve a given geometry with X and Y axis flipped.
For the
'POLYGON ((0 1 5, 2 3 5, 3 2 5, 2 1 5, 0 1 5))'
the flipped geometry isPOLYGON ((1 0 5, 3 2 5, 2 3 5, 1 2 5, 1 0 5))
Function signature:
flipXY(geometry: ogc:geomLiteral): 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 flip XY function is discoverable.
Postconditions
A SPARQL query can be executed that includes a function to return geometry with X and Y axis flipped. The results of the query are known to be true or false in 2D and 3D.
Steps
Actor: discovers flip XY function implemented by the system Actor: executes a SPARQL query with flip XY function and a geometry argument. System: returns a SPARQL result with a value that is a geometry with X and Y axis flipped.