Uploaded image for project: 'Spatial Information Systems'
  1. Spatial Information Systems
  2. SIS-359

Support coordinate transformations between CRS having duplicated axis orientations

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.6, 0.7, 0.8, 1.0, 1.1, 1.2, 1.3, 1.4
    • None
    • Referencing
    • None

    Description

      Coordinate systems are usually not allowed to have two axes with the same orientation. For example it is considered an error to have two axes oriented toward East. But there is at least two exceptions to this rule:

      Currently, attempt to transform two CRS having duplicated axis orientation produces an exception like below:

      org.opengis.util.FactoryException: Ne peut pas créer l’objet géodétique pour « CompoundCRS[“grib-lonlat-crs+Java…”] → CompoundCRS[“grib-lonlat-crs+Java…”] ».
          at org.apache.sis.referencing.operation.CoordinateOperationFinder.createOperation(CoordinateOperationFinder.java:206)
          at org.apache.sis.referencing.operation.DefaultCoordinateOperationFactory.createOperation(DefaultCoordinateOperationFactory.java:750)
          at org.apache.sis.referencing.CRS.findOperation(CRS.java:610)
          ... 22 more
          Caused by: java.lang.IllegalArgumentException: Les directions d’axes Other et Other sont colinéaires.
          at org.apache.sis.referencing.operation.matrix.Matrices.createTransform(Matrices.java:267)
          at org.apache.sis.referencing.operation.matrix.Matrices.createTransform(Matrices.java:440)
          at org.apache.sis.referencing.cs.CoordinateSystems.swapAndScaleAxes(CoordinateSystems.java:280)
          at org.apache.sis.referencing.operation.CoordinateOperationFinder.createOperation(CoordinateOperationFinder.java:204)
          ... 26 more
      

      One possible approach may be to remember the indirect association between axes and CRS during the computation performed by Matrices.createTransform(…). If two axes have the same axis direction but we can still distinguish the axes by the enclosing CRS instance, then we can avoid throwing the exception.

      Attachments

        Activity

          People

            desruisseaux Martin Desruisseaux
            desruisseaux Martin Desruisseaux
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: