Select to view content in your preferred language

CIMDatumTransform serialization to JSON not working properly

407
0
04-25-2023 03:03 AM
Labels (1)
marco_vertigis
Occasional Contributor

Hi there,

In my current project I try to programatically creating a CIMMapDocument definition using CIMMap.ToJson() method. It seems that the configured Datum and GeoTransformations are not properly serialized. See example below..

"datumTransforms": [
    {
      "type": "CIMDatumTransform",
      "forward": true
    },
    {
      "type": "CIMDatumTransform",
      "forward": false
    }
 ]

 

Some Information about the GeoTransformation are completely emitted. The json should look like this:

"datumTransforms" : [
      {
        "type" : "CIMDatumTransform",
        "forward" : true,
        "geoTransformation" : {
          "geoTransforms" : [
            {
              "wkid" : 15749,
              "latestWkid" : 15929,
              "transformForward" : true,
              "name" : "Belge_1972_To_WGS_1984_3"
            }
          ]
        }
      }
]

I did a bit of testing and found this. When calling the .ToJson() method on a GeoTransformation object a NotImplementedException is thrown >

cimMapDefinition.DatumTransforms[0].GeoTransformation.ToJson();

 

Someone got an idea how a GeoTransformation can be serialized properly?

0 Kudos
0 Replies