Open liberostelios opened 6 years ago
Briefly discussed my views about this with @liberostelios in person today. In short, I love the idea of hashes to verify an object's integrity and to enable versioning in the future, but I think they should be an optional attribute of every City Object, not their IDs.
My reasoning:
Why?
Currently, IDs of the city objects are meant to be any kind of unique identifiers without any restrictions. Messing around with different open datasets, I haven't seen a meaningful and functional use of the identifiers so far.
Instead of leaving this free to the implementation, I propose that we use hashes of the city object content as their IDs. This means that the hash can be representative of the city object. If something changes in the city object (geometry or attribute), then the hash changes as well.
That adds a lot of possibilities:
How?
A simple solution would be by simply hashing the string of the JSON encoding of the city object as it is today. That would make the hash, though, fragile against small changes (such as alteration to the CityJSON attribute names). There are many other possibilities which could be discussed. But the idea is that it should be very concrete what the hash function input is, so that developers always implement it in the same way.
Pros
Cons