Conversion /api/crs/converter/v3/convert class cast exception
During conversion via /convert endpoint transformation in SingleTrf.class always leads to class cast exception: Conversion request:
curl --location --request POST 'localhost:8080/api/crs/converter/v3/convert' \
--header 'data-partition-id: odesprod' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"fromCRS": "odesprod:reference-data--CoordinateReferenceSystem:BoundCRS::odesprod::23031024:",
"toCRS": "odesprod:reference-data--CoordinateReferenceSystem:Geographic2D:EPSG::4275:",
"points": [
{
"x": 697339.525,
"y": 7239989.403,
"z": 0
}
]
}'
From CRS Record
{
"data": {
"Transformation": {
"TransformationID": "odesprod:reference-data--CoordinateTransformation:Transformation::EPSG::1613:",
"AuthorityCode": {
"Authority": "EPSG",
"Code": 1613
},
"Name": "ED50 to WGS 84 (24)"
},
"PersistableReference": "{\"authCode\":{\"auth\":\"OSDU\",\"code\":\"23031024\"},\"lateBoundCRS\":{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"23031\"},\"name\":\"ED_1950_UTM_Zone_31N\",\"type\":\"LBC\",\"ver\":\"PE_10_3_1\",\"wkt\":\"PROJCS[\\\"ED_1950_UTM_Zone_31N\\\",GEOGCS[\\\"GCS_European_1950\\\",DATUM[\\\"D_European_1950\\\",SPHEROID[\\\"International_1924\\\",6378388.0,297.0]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],PROJECTION[\\\"Transverse_Mercator\\\"],PARAMETER[\\\"False_Easting\\\",500000.0],PARAMETER[\\\"False_Northing\\\",0.0],PARAMETER[\\\"Central_Meridian\\\",3.0],PARAMETER[\\\"Scale_Factor\\\",0.9996],PARAMETER[\\\"Latitude_Of_Origin\\\",0.0],UNIT[\\\"Meter\\\",1.0],AUTHORITY[\\\"EPSG\\\",23031]]\"},\"name\":\"ED50 / UTM zone 31N * EPSG-Nor S62 2001 [23031,1613]\",\"singleCT\":{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"1613\"},\"name\":\"ED_1950_To_WGS_1984_24\",\"type\":\"ST\",\"ver\":\"PE_10_3_1\",\"wkt\":\"GEOGTRAN[\\\"ED_1950_To_WGS_1984_24\\\",GEOGCS[\\\"GCS_European_1950\\\",DATUM[\\\"D_European_1950\\\",SPHEROID[\\\"International_1924\\\",6378388.0,297.0]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],GEOGCS[\\\"GCS_WGS_1984\\\",DATUM[\\\"D_WGS_1984\\\",SPHEROID[\\\"WGS_1984\\\",6378137.0,298.257223563]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],METHOD[\\\"Position_Vector\\\"],PARAMETER[\\\"X_Axis_Translation\\\",-90.365],PARAMETER[\\\"Y_Axis_Translation\\\",-101.13],PARAMETER[\\\"Z_Axis_Translation\\\",-123.384],PARAMETER[\\\"X_Axis_Rotation\\\",0.333],PARAMETER[\\\"Y_Axis_Rotation\\\",0.077],PARAMETER[\\\"Z_Axis_Rotation\\\",0.894],PARAMETER[\\\"Scale_Difference\\\",1.994],AUTHORITY[\\\"EPSG\\\",1613]]\"},\"type\":\"EBC\",\"ver\":\"PE_10_3_1\"}",
"CodeAsNumber": 23031024,
"CoordinateSystem": {
"HorizontalAxisUnitID": "odesprod:reference-data--UnitOfMeasure:m:",
"AuthorityCode": {
"Authority": "EPSG",
"Code": 4400
},
"Name": "Cartesian 2D CS. Axes: easting, northing (E,N). Orientations: east, north. UoM: m."
},
"Projection": {
"AuthorityCode": {
"Authority": "EPSG",
"Code": 16031
},
"Name": "UTM zone 31N"
},
"Code": "23031024",
"Source": "Workbook Published/CoordinateReferenceSystem.1.0.0.xlsx; commit SHA c1d72417.",
"Name": "ED50 / UTM zone 31N * EPSG-Nor S62 2001 [23031,1613]",
"CoordinateReferenceSystemType": "BoundCRS",
"RevisionDate": "2021-02-15T00:00:00",
"PreferredUsage": {
"Scope": {
"Name": "Scope intersection between 'Engineering survey, topographic mapping.' and 'Approximation at the 1m level.' [1142,1253]"
},
"Extent": {
"BoundingBoxWestBoundLongitude": 1.37,
"BoundingBoxNorthBoundLatitude": 62,
"BoundingBoxEastBoundLongitude": 6.01,
"BoundingBoxSouthBoundLatitude": 56.08,
"Name": "Extent intersection between 'Europe - 0°E to 6°E and ED50 by country' and 'Norway - North Sea - offshore south of 62°N' [1634,2334]"
},
"Name": "Usage intersection between 'Europe - 0°E to 6°E and ED50 by country' and 'Norway - North Sea - offshore south of 62°N' [6394,8534]"
},
"BaseCRS": {
"AuthorityCode": {
"Authority": "EPSG",
"Code": 4230
},
"BaseCRSID": "odesprod:reference-data--CoordinateReferenceSystem:GeodeticCRS::EPSG::4230::",
"Name": "ED50"
},
"Kind": "bound CRS",
"ID": "BoundCRS::odesprod::23031024",
"Usages": [
{
"Scope": {
"Name": "Scope intersection between 'Engineering survey, topographic mapping.' and 'Approximation at the 1m level.' [1142,1253]"
},
"Extent": {
"BoundingBoxWestBoundLongitude": 1.37,
"BoundingBoxNorthBoundLatitude": 62,
"BoundingBoxEastBoundLongitude": 6.01,
"BoundingBoxSouthBoundLatitude": 56.08,
"Name": "Extent intersection between 'Europe - 0°E to 6°E and ED50 by country' and 'Norway - North Sea - offshore south of 62°N' [1634,2334]"
},
"Name": "Usage intersection between 'Europe - 0°E to 6°E and ED50 by country' and 'Norway - North Sea - offshore south of 62°N' [6394,8534]"
}
],
"SourceCRS": {
"AuthorityCode": {
"Authority": "EPSG",
"Code": 23031
},
"SourceCRSID": "odesprod:reference-data--CoordinateReferenceSystem:ProjectedCRS::EPSG::23031:",
"Name": "ED50 / UTM zone 31N"
}
},
"id": "odesprod:reference-data--CoordinateReferenceSystem:BoundCRS::odesprod::23031024",
"version": 1617285407022338,
"kind": "odesprod:wks:reference-data--CoordinateReferenceSystem:1.0.0",
"acl": {
"viewers": [
"data.default.owners@odesprod.osdu-gcp.go3-nrg.projects.epam.com"
],
"owners": [
"data.default.owners@odesprod.osdu-gcp.go3-nrg.projects.epam.com"
]
},
"legal": {
"legaltags": [
"odesprod-demo-legaltag"
],
"otherRelevantDataCountries": [
"US"
],
"status": "compliant"
},
"createUser": "osdu-sa-airflow-composer@osdu-service-prod.iam.gserviceaccount.com",
"createTime": "2021-04-01T13:56:47.071Z"
}
To CRS Record:
{
"data": {
"Code": "4275",
"CodeAsNumber": 4275,
"CodeSpace": "EPSG",
"CommitDate": "2021-12-13T13:08:21+01:00",
"CoordinateReferenceSystemType": "GeodeticCRS",
"CoordinateSystem": {
"AuthorityCode": {
"Authority": "EPSG",
"Code": 6422
},
"HorizontalAxisUnitID": "odesprod:reference-data--UnitOfMeasure:dega:",
"Name": "Ellipsoidal 2D CS. Axes: latitude, longitude. Orientations: north, east. UoM: degree"
},
"Datum": {
"AuthorityCode": {
"Authority": "EPSG",
"Code": 6275
},
"Name": "Nouvelle Triangulation Francaise"
},
"ID": "Geographic2D:EPSG::4275",
"Kind": "geographic 2D",
"Name": "NTF",
"PersistableReference": "{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"4275\"},\"name\":\"GCS_NTF\",\"type\":\"LBC\",\"ver\":\"PE_10_9_1\",\"wkt\":\"GEOGCS[\\\"GCS_NTF\\\",DATUM[\\\"D_NTF\\\",SPHEROID[\\\"Clarke_1880_IGN\\\",6378249.2,293.4660212936265]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433],AUTHORITY[\\\"EPSG\\\",4275]]\"}",
"PreferredUsage": {
"AuthorityCode": {
"Authority": "EPSG",
"Code": 3157
},
"Extent": {
"AuthorityCode": {
"Authority": "EPSG",
"Code": 3694
},
"BoundingBoxEastBoundLongitude": 9.63,
"BoundingBoxNorthBoundLatitude": 51.14,
"BoundingBoxSouthBoundLatitude": 41.31,
"BoundingBoxWestBoundLongitude": -4.87,
"Name": "France - onshore - mainland and Corsica"
},
"Name": "France - onshore - mainland and Corsica",
"Scope": {
"AuthorityCode": {
"Authority": "EPSG",
"Code": 1027
},
"Name": "Geodesy."
}
},
"RevisionDate": "2010-03-30T00:00:00+00:00",
"Source": "Workbook Resources/IOGP/Manifests/reference-data/CoordinateReferenceSystem.1.0.0.json; commit SHA 9ed9f2cc.",
"Usages": [
{
"AuthorityCode": {
"Authority": "EPSG",
"Code": 3157
},
"Extent": {
"AuthorityCode": {
"Authority": "EPSG",
"Code": 3694
},
"BoundingBoxEastBoundLongitude": 9.63,
"BoundingBoxNorthBoundLatitude": 51.14,
"BoundingBoxSouthBoundLatitude": 41.31,
"BoundingBoxWestBoundLongitude": -4.87,
"Name": "France - onshore - mainland and Corsica"
},
"Name": "France - onshore - mainland and Corsica",
"Scope": {
"AuthorityCode": {
"Authority": "EPSG",
"Code": 1027
},
"Name": "Geodesy."
}
}
]
},
"id": "odesprod:reference-data--CoordinateReferenceSystem:Geographic2D:EPSG::4275",
"version": 1648827889605115,
"kind": "odesprod:wks:reference-data--CoordinateReferenceSystem:1.0.0",
"acl": {
"viewers": [
"data.default.viewers@odesprod.osdu-gcp.go3-nrg.projects.epam.com"
],
"owners": [
"data.default.owners@odesprod.osdu-gcp.go3-nrg.projects.epam.com"
]
},
"legal": {
"legaltags": [
"odesprod-demo-legaltag"
],
"otherRelevantDataCountries": [
"US"
],
"status": "compliant"
},
"createUser": "osdu-sa-airflow-composer@osdu-service-prod.iam.gserviceaccount.com",
"createTime": "2022-03-22T13:53:39.574Z",
"modifyUser": "osdu-sa-airflow-composer@osdu-service-prod.iam.gserviceaccount.com",
"modifyTime": "2022-04-01T15:45:05.785Z"
}
This class casting is unavoidable to fail : https://community.opengroup.org/osdu/platform/system/reference/crs-conversion-service/-/blob/master/crs-converter-core/src/main/java/org/opengroup/osdu/crs/model/Impl/SingleTrf.java#L121