Geonovum / uml2json

Best Practise for OGC - UML to JSON Encoding Rules
https://geonovum.github.io/uml2json/document.html
0 stars 1 forks source link

Geometries in plain JSON: explain choice for GeoJSON geometries #42

Closed heidivanparys closed 4 months ago

heidivanparys commented 1 year ago

For the geometries in plain JSON, (only) the GeoJSON schemas for the geometries are used. It would be useful to add the reasoning behind this choice in the best practice.

In previous engineering reports, the possibility of using WKT has been explored, with arguments in favour and against.

WKT in JSON is also supported by e.g. FME, see https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_ReadersWriters/json/JSON_reader.htm and screenshot below.

image

jechterhoff commented 5 months ago

If I remember correctly, we stated this as a requirement to improve interoperability. But I see your point.

Proposal: Switch the requirement to a recommendation. Add a note which explains that other geometry encodings are allowed in plain JSON, for example a WKT string or a JSON-FG geometry.

@heidivanparys and @PalmJanssen: What do you think?

heidivanparys commented 5 months ago

Change the requirement to a recommendation is ok with me.

PalmJanssen commented 4 months ago

Agree, change to requirement and add note.

jechterhoff commented 4 months ago

Done.

Note that the plain JSON Schema format requirements class now only has a recommendation, no additional requirement. That may look weird, but is ok according to the OGC specification model (OGC 08-131r3; Figure C.1). Furthermore, the plain JSON Schema format requirements class depends on the abstract Core requirements class. Thus, all the requirements defined there apply to the plain JSON Schema encoding.