opengeospatial / geoapi

GeoAPI provides a set of interfaces in programming languages (currently Java and Python) for geospatial applications. The GeoAPI interfaces closely follow OGC specifications, adaptated to match the expectations of programmers.
http://www.geoapi.org
Apache License 2.0
118 stars 37 forks source link

Tuple as a parent interface of DirectPosition #68

Open desruisseaux opened 2 years ago

desruisseaux commented 2 years ago

Consider adding a Tuple interface as a parent interface of DirectPosition. This interface does not exist in abstract specifications as far as I know, so it would be an extension.

The reason is because MathTransform is used not only for coordinate transformations. It can also be used for other kinds of transformations, for example:

This is not a GeoAPI interpretation; it was intended that way in OGC 01-009 and OGC 01-004. But when the MathTransform is used that way, the transform(DirectPosition) method makes little sense. It should be transform(Tuple) instead.

Even when MathTransform is really used for transforming coordinates, it ignores the CoordinateReferenceSystem associated to DirectPosition. Because Tuple has no CRS, the use of Tuple instead of DirectPosition in MathTransform would make that semantic clear.