Hi @FMELizard, I've never developed such a workflow, but found a Coordinate System Description with OGC WKT representation could be converted to a JSON document with string operations. For example, if "_ogcCoordSys" stores the OGC WKT coordinate system description of "LL-WGS84", [Updated]
@ReplaceString(@ReplaceRegEx(@Value(_ogcCoordSys),"([^,\[\]]+)(?=\[)",{"\1":),],]})
returns this JSON document.
{
"GEOGCS" : [ "WGS84 Lat/Longs",
{
"DATUM" : [ "WGS_1984",
{
"SPHEROID" : [ "World Geodetic System of 1984, GEM 10C", 6378137, 298.257223563,
{
"AUTHORITY" : [ "EPSG", "7030" ]
}
]
},
{
"AUTHORITY" : [ "EPSG", "6326" ]
}
]
},
{
"PRIMEM" : [ "Greenwich", 0 ]
},
{
"UNIT" : [ "degree", 0.0174532925199433 ]
},
{
"AUTHORITY" : [ "EPSG", "4326" ]
}
]
}
I think you can extract required properties from the JSON document.
@takashi great solution. I think to use the transformer PythonCaller and write code to extract the informations.
Hi @FMELizard, I've never developed such a workflow, but found a Coordinate System Description with OGC WKT representation could be converted to a JSON document with string operations. For example, if "_ogcCoordSys" stores the OGC WKT coordinate system description of "LL-WGS84", [Updated]
@ReplaceString(@ReplaceRegEx(@Value(_ogcCoordSys),"([^,\[\]]+)(?=\[)",{"\1":),],]})
returns this JSON document.
{
"GEOGCS" : [ "WGS84 Lat/Longs",
{
"DATUM" : [ "WGS_1984",
{
"SPHEROID" : [ "World Geodetic System of 1984, GEM 10C", 6378137, 298.257223563,
{
"AUTHORITY" : [ "EPSG", "7030" ]
}
]
},
{
"AUTHORITY" : [ "EPSG", "6326" ]
}
]
},
{
"PRIMEM" : [ "Greenwich", 0 ]
},
{
"UNIT" : [ "degree", 0.0174532925199433 ]
},
{
"AUTHORITY" : [ "EPSG", "4326" ]
}
]
}
I think you can extract required properties from the JSON document.
Very nice! I was looking for a way to do the JSON conversion to set up a validation process for our coordinate system Esri exceptions. Thank you.