Clarify SIS WKT requirements
@marneson @gehrmann @sjtomlinson (somehow I cannot get Josh and Lifei to show up here typing 'at')
Operators have a requirement to define custom datum, CRS and CT. Efforts are underway to add in the OSDU reference data an persistent reference that is in ESRI WKT style, dynamically generated from an Operator database. While discussing this, it has been said that the Apache SIS implementation (might) extracts the EPSG code from the persistent reference and does not actually use the WKT. This is confusing to geomatics group because our understanding was that OSDU is using an explicit definition that is passed on to the engine and not an implicit identification (by code) to a configured engine.
The ask is to clarify how exactly the CRS Convert API is using the persistent reference (stringified ESRI WKT as shown below).
We have done some tests TEST 1. Make a request to CRS Convert using AUTHORITY[\"EPSG\",23031]]"} but changing the False_Easting parameter. Our conclusion is that somehow the EPSG::1133 takes precedence, i.e., the change FE is ignored. It is hard to see with this awkward "toCRS" but note that the false_easting is set to 100,000 while for EPSG::23031 UTM in EPSG Dataset it is FE=500,000m.
My conclusion is that somehow the api is using the EPSG code 23031 implicitly and ignoring the WKT explicit definition.
TEST 2. Make a request to CRS Convert using a random AUTHORITY[\"SHELL\",50004]]"} which SIS would have no knowledge about, while keeping the rest of the WKT the same (using the EPSG parameters, incl. FE=500,000).
My conclusion is that SIS must be passed the WKT explicitly.
The response in both cases was (to the nanometer...) "x": 567201.6875129965, "y": 5872948.914669735,
Of course it would be good to change the PROJCS name in case that is somehow magically used; or even better, try an actual custom CRS definition and manually created WKT for an operator defined regional CRS but that has not been done yet.
This is very important because our plan is to extent EpsgManifestGenerator to dynamically create the persistent WKT for Operator custom entities such that the OSDU CRS Convert Apache SIS can be called with it. If it would turn out the WKT is not used we'd be back at "square one".
Note: there is some relation to the issue of simplifying the i/o to Convert CRS, i.e., to enable the API to use OSDU "id" for fromCRS, toCRS and CT (if not bound). However that is a separate discussion. In the case to simplify and use "id" the point is that the WKT is retrieved from the reference data, not that a configuration with the engine must be maintained or relied on.
---REQUESTS--------------------- TEST1: { "fromCRS": "{"authCode":{"auth":"OSDU","code":"23095001"},"lateBoundCRS":{"authCode":{"auth":"EPSG","code":"23095"},"name":"ED_1950_TM_5_NE","type":"LBC","ver":"PE_10_3_1","wkt":"PROJCS[\"ED_1950_TM_5_NE\",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\",5.0],PARAMETER[\"Scale_Factor\",0.9996],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter\",1.0],AUTHORITY[\"EPSG\",23095]]"},"name":"ED50 * DMA-mean / TM 5 NE [23095,1133]","singleCT":{"authCode":{"auth":"EPSG","code":"1133"},"name":"ED_1950_To_WGS_1984_1","type":"ST","ver":"PE_10_3_1","wkt":"GEOGTRAN[\"ED_1950_To_WGS_1984_1\",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[\"Geocentric_Translation\"],PARAMETER[\"X_Axis_Translation\",-87.0],PARAMETER[\"Y_Axis_Translation\",-98.0],PARAMETER[\"Z_Axis_Translation\",-121.0],AUTHORITY[\"EPSG\",1133]]"},"type":"EBC","ver":"PE_10_3_1"}", "toCRS": "{"authCode":{"auth":"OSDU","code":"23031001"},"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\",100000.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 * DMA-mean / UTM zone 31N [23031,1133]","singleCT":{"authCode":{"auth":"EPSG","code":"1133"},"name":"ED_1950_To_WGS_1984_1","type":"ST","ver":"PE_10_3_1","wkt":"GEOGTRAN[\"ED_1950_To_WGS_1984_1\",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[\"Geocentric_Translation\"],PARAMETER[\"X_Axis_Translation\",-87.0],PARAMETER[\"Y_Axis_Translation\",-98.0],PARAMETER[\"Z_Axis_Translation\",-121.0],AUTHORITY[\"EPSG\",1133]]"},"type":"EBC","ver":"PE_10_3_1"}", "points": [ { "x": "432978.7", "y": "5872946.4", "z": "0" } ] }
TEST2 { "fromCRS": "{"authCode":{"auth":"OSDU","code":"23095001"},"lateBoundCRS":{"authCode":{"auth":"EPSG","code":"23095"},"name":"ED_1950_TM_5_NE","type":"LBC","ver":"PE_10_3_1","wkt":"PROJCS[\"ED_1950_TM_5_NE\",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\",5.0],PARAMETER[\"Scale_Factor\",0.9996],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter\",1.0],AUTHORITY[\"SHELL\",50001]]"},"name":"ED50 * DMA-mean / TM 5 NE [23095,1133]","singleCT":{"authCode":{"auth":"EPSG","code":"1133"},"name":"ED_1950_To_WGS_1984_1","type":"ST","ver":"PE_10_3_1","wkt":"GEOGTRAN[\"ED_1950_To_WGS_1984_1\",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[\"Geocentric_Translation\"],PARAMETER[\"X_Axis_Translation\",-87.0],PARAMETER[\"Y_Axis_Translation\",-98.0],PARAMETER[\"Z_Axis_Translation\",-121.0],AUTHORITY[\"SHELL\",50002]]"},"type":"EBC","ver":"PE_10_3_1"}", "toCRS": "{"authCode":{"auth":"OSDU","code":"23031001"},"lateBoundCRS":{"authCode":{"auth":"EPSG","code":"23031"},"name":"ED_1950_XXXXXX_Zone_31N","type":"LBC","ver":"PE_10_3_1","wkt":"PROJCS[\"ED_1950_XXXX_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[\"SHELL\",50003]]"},"name":"ED50 * DMA-mean / UTM zone 31N [23031,1133]","singleCT":{"authCode":{"auth":"EPSG","code":"1133"},"name":"ED_1950_To_WGS_1984_1","type":"ST","ver":"PE_10_3_1","wkt":"GEOGTRAN[\"ED_1950_To_WGS_1984_1\",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[\"Geocentric_Translation\"],PARAMETER[\"X_Axis_Translation\",-87.0],PARAMETER[\"Y_Axis_Translation\",-98.0],PARAMETER[\"Z_Axis_Translation\",-121.0],AUTHORITY[\"SHELL\",50004]]"},"type":"EBC","ver":"PE_10_3_1"}", "points": [ { "x": "432978.7", "y": "5872946.4", "z": "0" } ] }