GeoTools
  1. GeoTools
  2. GEOT-1578

Flipped axis CRS do miss some information compared to the original ones

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.4.6
    • Component/s: referencing
    • Labels:
      None

      Description

      A crs forced to lon/lat order will miss some information compared to the original one, in particular at least scope and valid area.
      The following code snippet shows the difference:

      import org.geotools.referencing.CRS;
      import org.opengis.referencing.crs.CoordinateReferenceSystem;
      
      
      public class MissingInfo {
          public static void main(String[] args) throws Exception {
              System.out.println("Lat/lon code:");
              final String code = "EPSG:2027";
              printInfo(CRS.decode(code));
              
              System.out.println("\n\n\nLon/Lat code:");
              printInfo(CRS.decode(code, true));
          }
      
          private static void printInfo(final CoordinateReferenceSystem crs) {
              System.out.println("Aliases: " + crs.getAlias());
              System.out.println("Identifiers: " + crs.getIdentifiers());
              System.out.println("Valid area: " + crs.getValidArea());
              System.out.println("Remarks: " + crs.getRemarks());
              System.out.println("Scope: " + crs.getScope());
          }
      }
      

        Issue Links

          Activity

          Andrea Aime made changes -
          Field Original Value New Value
          Fix Version/s 2.4.1 [ 14069 ]
          Fix Version/s 2.4-RC1 [ 13677 ]
          Andrea Aime made changes -
          Fix Version/s 2.4.2 [ 14108 ]
          Fix Version/s 2.4.1 [ 14069 ]
          Andrea Aime made changes -
          Fix Version/s 2.4.2 [ 14108 ]
          Fix Version/s 2.4.3 [ 14180 ]
          Jody Garnett made changes -
          Fix Version/s 2.5-M1 [ 13281 ]
          Fix Version/s 2.5-M2 [ 14258 ]
          Jody Garnett made changes -
          Fix Version/s 2.5-M2 [ 14258 ]
          Andrea Aime made changes -
          Fix Version/s 2.4.3 [ 14180 ]
          Fix Version/s 2.4.4 [ 14320 ]
          Andrea Aime made changes -
          Fix Version/s 2.4.5 [ 14338 ]
          Fix Version/s 2.4.4 [ 14320 ]
          Gabriel Roldan made changes -
          Fix Version/s 2.4.5 [ 14338 ]
          Fix Version/s 2.4.6 [ 14552 ]
          Martin Desruisseaux made changes -
          Link This issue depends upon GEOT-2117 [ GEOT-2117 ]
          Jody Garnett made changes -
          Assignee Martin Desruisseaux [ desruisseaux ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Andrea Aime
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: