cleder/czml

Advantages?

drakej opened this issue · 2 comments

Is there any advantage to using this over straight JSON besides data validation? I noticed that it makes sure properties are set that are required in some cases, however I also noticed that it completely ignores properties it's not aware of and only supports a very small subset of the current CZML spec.

No, if you know how to write the json for czml, just do it there is no need to use this library

I would add that depending on your use case the validation can be an extremely valuable feature. I had a project where I was programmatically generating an arbitrary number of CZML documents from data scraped from a public source. I could have skipped using this library and just built JSON objects directly in python, but then to spot issues in individual results I would have to load each one in a Cesium instance to look at it. This library helped me do validation in a much more automated way, and that dramatically sped up development time.

As for its coverage, this library does fall short of the CZML spec because the CZML spec is a fast moving target. That team has been in growth mode all this year and they've been pushing the format considerably; this repo is all maintained by volunteers and so hasn't been able to keep pace. Regardless, when I first began contributing to this repo in early 2015 I found it in a similar state of being behind the CZML spec, and it really didn't take much to build out many of the missing pieces. Comparatively it's far easier to iterate over this python CZML library to match the spec than it is for the Cesium team to expand the spec with new features.