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

TransverseMercator projection provider missing in service file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.6
    • 0.6
    • Referencing
    • None
    • Patch

    Description

      I'm trying to parse the following WKT using the code from trunk and get an exception:

      CoordinateReferenceSystem crs = CRS.fromWKT("PROJCS[\"RT90 2.5 gon V\",GEOGCS[\"RT90\",DATUM[\"Rikets_koordinatsystem_1990\",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[414.1055246174,41.3265500042,603.0582474221,-0.8551163377,2.1413174055,-7.0227298286,0],AUTHORITY[\"EPSG\",\"6124\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4124\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",15.80827777777778],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",1500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AUTHORITY[\"EPSG\",\"3021\"]]");
      
      Exception in thread "main" org.opengis.util.NoSuchIdentifierException: No operation method found for name or identifier “Transverse_Mercator”.
      	at org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory.getOperationMethod(DefaultMathTransformFactory.java:381)
      	at org.apache.sis.referencing.operation.DefaultCoordinateOperationFactory.getOperationMethod(DefaultCoordinateOperationFactory.java:179)
      	at org.apache.sis.internal.referencing.ServicesForMetadata.getOperationMethod(ServicesForMetadata.java:672)
      	at org.apache.sis.io.wkt.GeodeticObjectParser.parseMethod(GeodeticObjectParser.java:1225)
      	at org.apache.sis.io.wkt.GeodeticObjectParser.parseDerivingConversion(GeodeticObjectParser.java:1273)
      	at org.apache.sis.io.wkt.GeodeticObjectParser.parseProjectedCRS(GeodeticObjectParser.java:1963)
      	at org.apache.sis.io.wkt.GeodeticObjectParser.parseCoordinateReferenceSystem(GeodeticObjectParser.java:360)
      	at org.apache.sis.io.wkt.GeodeticObjectParser.parseObject(GeodeticObjectParser.java:323)
      	at org.apache.sis.io.wkt.AbstractParser.parseObject(AbstractParser.java:240)
      	at org.apache.sis.io.wkt.GeodeticObjectParser.parseObject(GeodeticObjectParser.java:281)
      	at org.apache.sis.io.wkt.AbstractParser.createFromWKT(AbstractParser.java:209)
      	at org.apache.sis.referencing.factory.GeodeticObjectFactory.createFromWKT(GeodeticObjectFactory.java:1436)
      	at org.apache.sis.referencing.CRS.fromWKT(CRS.java:236)
      

      It seems there are a few projection providers missing from the service file. It works if I apply the attached patch.

      Maybe the providers in the OperationMethod service file should be sorted by name to make the file easier to read?

      Attachments

        1. TransverseMercator.diff
          1 kB
          Fredrik Kjellberg

        Issue Links

          Activity

            People

              desruisseaux Martin Desruisseaux
              frkj Fredrik Kjellberg
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: