opengeospatial / CRS-JSON-Encoding

0 stars 2 forks source link

generated JSON Schema from ISO 19111 ed3 UML using ShapeChange #66

Closed jechterhoff closed 1 week ago

jechterhoff commented 1 month ago

see ReadMe.md in folder uml2json for further details

desruisseaux commented 1 month ago

For comparison purposes with the first draft discussed two weeks ago, the instance example generated in the uml2json/instances/2154.json file has been merged to the previous example in examples/EPSG_2154.json file. For keeping the differences smaller (for easier comparison), the following changes have been omitted:

Questions about "UML to JSON" process

The EPSG definition of the instance used as an example contains the two following aliases:

The uml2json/instances/2154.json file shown four aliases:

"alias": [
  "FR_RGF93",
  "LAMB93",
  "RGF93",
  "Lambert-93"
]

Was the above generated by ShapeChange or manually edited? If it was generated by ShapeChange, maybe a slight modification would be desirable, as I think that "FRRGF93 / LAMB93" (for example) is not to be interpreted as two aliases, but rather as "LAMB93 projection on the FRRGF93 datum". We could think about that as an LAMB93 code in the FR_RGF93 namespace.

Future work

We need to complete the method definition with its list of parameters. Example:

"method": {
  "entityType": "OperationMethod",
  "name": "Lambert Conic Conformal (2SP)",
  "formulaReference": {
    "formula": "TODO"
  },
  "parameter": [
    {
      "entityType": "OperationParameter",
      "name": "Latitude of false origin",
      "identifier": [
        {
          "type": "MD_Identifier",
          "codespace": "EPSG",
          "code": 8821
        }
      ]
    },
    {
      "entityType": "OperationParameter",
      "name": "Longitude of false origin",
      "identifier": [
        {
          "type": "MD_Identifier",
          "codespace": "EPSG",
          "code": 8822
        }
      ]
    }
  ]
}

Then, the parameter value below the operation method should use links to the above declarations in their parameter element. Example:

"parameterValue": [
  {
    "entityType": "OperationParameterValue",
    "parameter": How to reference the above EPSG:8821 parameter?
    "parameterValue": {
      "value": {
        "value": 46.5,
        "uom": "deg"
      }
    }
  },
  {
    "entityType": "OperationParameterValue",
    "parameter": How to reference the above EPSG:8822 parameter?
    "parameterValue": {
      "value": {
        "value": 3,
        "uom": "deg"
      }
    }
  }
]

Open question: how to reference the above-declared parameters?

jechterhoff commented 1 month ago

Regarding your first question on the aliases in the example: indeed, they were edited manually. So you can change / correct them as you see fit.

Referencing in JSON is possible by using add-on specifications. Much like xlink is used in the GML encoding, here you could use JSON Pointer.