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

          Hide
          Andrea Aime added a comment -
          For the record, the result of runnit that is:

          {code}
          Lat/lon code:
          Aliases: []
          Identifiers: [EPSG:2027]
          Valid area: Extent:
            Geographic Elements:
              West Bound Longitude: -96
              South Bound Latitude: 48
              East Bound Longitude: -90
              North Bound Latitude: 56,3
              Inclusion: true
            Description: Canada - Ontario - between 96 and 90 deg West.

          Remarks: Supersedes NAD27 / UTM zone 15N (code 26715).
          Scope: Large and medium scale topographic mapping and engineering survey.

          Lon/Lat code:
          Aliases: []
          Identifiers: [EPSG:2027]
          Valid area: null
          Remarks: Supersedes NAD27 / UTM zone 15N (code 26715).
          Scope: null
          {code}

          That is, most informations are lost when flipping axis
          Show
          Andrea Aime added a comment - For the record, the result of runnit that is: {code} Lat/lon code: Aliases: [] Identifiers: [EPSG:2027] Valid area: Extent:   Geographic Elements:     West Bound Longitude: -96     South Bound Latitude: 48     East Bound Longitude: -90     North Bound Latitude: 56,3     Inclusion: true   Description: Canada - Ontario - between 96 and 90 deg West. Remarks: Supersedes NAD27 / UTM zone 15N (code 26715). Scope: Large and medium scale topographic mapping and engineering survey. Lon/Lat code: Aliases: [] Identifiers: [EPSG:2027] Valid area: null Remarks: Supersedes NAD27 / UTM zone 15N (code 26715). Scope: null {code} That is, most informations are lost when flipping axis

            People

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

              Dates

              • Created:
                Updated: