opengeospatial / GeoPose

OGC GeoPose development.
Apache License 2.0
41 stars 17 forks source link

Advanced GeoPose JSON encoding not JSONic #69

Open jerstlouis opened 1 year ago

jerstlouis commented 1 year ago

(apologies in advance if this sounds too critical and for providing feedback at this very late stage, but I believe this is an important issue) About the Advanced GeoPose JSON encoding (9.2.4), is there any particular reason why parameters are encoded within a string in a URL-like manner, rather than in the natural JSON way of using objects and arrays? i.e., why:

"parameters": "longitude=-122.3000000&latitude=47.7000000&height=11.000"

instead of:

"parameters": { "longitude" :-122.3000000, "latitude" : 47.7000000, "height" : 11.000 }

Similar question for the integrityCheck escaping double quotes and curlies in 9.2.7. Why:

"integrityCheck": "{\"SHA256\": \"5556fb65f8bf9eddb3ace1329c9a6aeedd4833409965aeee3e6b61ed21f47858\"}",

instead of:

"integrityCheck": { "SHA256": "5556fb65f8bf9eddb3ace1329c9a6aeedd4833409965aeee3e6b61ed21f47858" }

It necessitates separate parsing passes on the strings and unless there is a really good reason, it seems to defeat the purpose of a JSON encoding.

MikelSalazar commented 1 year ago

Sadly, this is a known issue, where @3DXScape insisted on using strings instead of proper JSON schema. I believe it was in part to not have to cover that part in the current specification of the standard (allowing third parties to extend the system in a different, URL-based way), but it is making the implementation of the Advanced types of GeoPose very difficult. I would suggest that, instead of using arrays of strings for external systems, we modify the standard to include a proper JSON schema for the types of advanced positioning systems that we actually need to take into consideration.

jerstlouis commented 1 year ago

See also #70 about trying to make the more advanced capabilities simple extensions to the basic GeoPoses. This allows implementers to start small and gradually implement additional features, and I believe this approach is critical for adoption. If adding features means re-starting from scratch, the advanced features may never be implemented, and if the basic capabilties are too limited, none of it is likely to be.