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

            People

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

              Dates

              • Created:
                Updated: