Following are some items I identified while reviewing https://github.com/opengeospatial/ogcapi-features/blob/master/proposals/versioned-features.md
Providing general feedback and recommendations to open the floor for more design considerations.
Validity/Transaction Time Semantic
In Collection metadata, the validity-time and transaction-time are proposed.
However, it is fairly common for created/updated fields to be used to reflect when the "transaction" portion was applied. For example, STAC Common Metadata - Date and Time and OGC API Processes - Job Status use them.
For the sake of alignment, I would recommend reusing them.
Similarly, a mutable field could be used matching what OGC API Processes - DRU does.
IMO, a validity-time seems redundant, because the updated feature's datetime field (or possibly start_datetime/end_datetime in STAC) combined with the Collection's temporal extent with OGC API Common: Part 2 + UAD) should already indicate when it applies (when it is valid).
A "versioning-aware" and a "regular" feature should essentially be the same, if not undistinguishable, for a client that doesn't know the semantics of this extension.
Deprecation and Versioning link relations
I strongly recommend having a look at https://github.com/stac-extensions/version. It introduces a deprecated flag, the version field, and employs the same IANA versioning link relations proposed in this extension. It is a natural alignment to consider.
In Access to a feature and its versions, I would personally avoid using canonical, since it could be referring to something else (e.g.: a remote authority reference). Instead, I would recommend using the current link relation to reflect the preferred "latest" feature.
The first and last to reflect versioning links should take into consider other usages like paging. Possibly, these are not the same as versioning references (at least not directly). Paging could be relevant if there are a lot of updated feature revisions that could be accessed with /collections/{collectionId}/items/{featureId}/versions?limit=10&page=2 for example. The prev/next would apply as normal paging links in that context. For the others, it is tricky because a rel: start exists, but there is no rel: end. I am not quite sure what would be the best way to distinguish first/start and last/??? between versioning/paging concepts and RFC 7089 Memento definitions.
Relationship with datetime parameter - no versioning parameters?
I agree with Relationship to the existing datetime parameter and Backwards compatibility that datetime should not change its meaning and simply interact with the "temporal-validity" concept of the features.
However, the lack of a parameter to obtain the older versions can be problematic. For example, if a version used to be valid within a certain time period, and was updated to reflect a change (e.g.: a store that changed owner/name), the older feature would suddenly disappear. There are 2 workarounds.
- Provide "duplicate features", like currently (without the extension), which will be filtered the normal way by "valid"
datetime. Essentially, something similar to versions-as-features and versions-as-features-unique-ids profiles.
- Provide some sort of
?revisions= / ?version= parameters to allow retrieving older versions of the feature.
In case (2), using /collctions/xx/items?revisions=true could allow returning all revisions of a feature (with additional filters applicable) rather than only the latest one (default behaviour). Similarly, /collctions/xx/items/{featureId}?version=x.y.z would select the specific older revision, matching the version field in the feature (or the latest if omitted).
One important distinction should be that versioned features can employ the same featureId, and therefore a version would also be required to distinguish them. If a distinct featureId is used to encode the different versions (which is also valid, but not the scope of this extension), then the multiple feature revisions would be returned in the full feature listing anyway, and datetime queries could already filter them, making the extra versioning somewhat unnecessary/redundant. Therefore, some parameters must be provided to indicate or facilitate the listing of multiple feature revisions, or within a certain "interval of validity". I believe combining ?revisions=true&datetime=../.. would allow to do this since all valid features within that time interval would be considered, not just the latest revisions.
Profiles
Personally, I think features-with-time-slices overcomplicates things and should be dropped altogether. I think there are more chances that it confuses users.
If a group wants to manage these versioned features separately and all at once, they could simply create a separate collection from them, or employ the versioning endpoint (see below).
Extra Media-Types
The /collections/{collectionId}/items/{featureId}/versions endpoint could leverage the fact that it would be a collection of features, so it could reuse the same feature-collection media-types employed by other endpoints.
Following are some items I identified while reviewing https://github.com/opengeospatial/ogcapi-features/blob/master/proposals/versioned-features.md
Providing general feedback and recommendations to open the floor for more design considerations.
Validity/Transaction Time Semantic
In Collection metadata, the
validity-timeandtransaction-timeare proposed.However, it is fairly common for
created/updatedfields to be used to reflect when the "transaction" portion was applied. For example, STAC Common Metadata - Date and Time and OGC API Processes - Job Status use them.For the sake of alignment, I would recommend reusing them.
Similarly, a
mutablefield could be used matching what OGC API Processes - DRU does.IMO, a
validity-timeseems redundant, because the updated feature'sdatetimefield (or possiblystart_datetime/end_datetimein STAC) combined with the Collection's temporalextentwith OGC API Common: Part 2 + UAD) should already indicate when it applies (when it is valid).A "versioning-aware" and a "regular" feature should essentially be the same, if not undistinguishable, for a client that doesn't know the semantics of this extension.
Deprecation and Versioning link relations
I strongly recommend having a look at https://github.com/stac-extensions/version. It introduces a
deprecatedflag, theversionfield, and employs the same IANA versioning link relations proposed in this extension. It is a natural alignment to consider.In Access to a feature and its versions, I would personally avoid using
canonical, since it could be referring to something else (e.g.: a remote authority reference). Instead, I would recommend using thecurrentlink relation to reflect the preferred "latest" feature.The
firstandlastto reflect versioning links should take into consider other usages like paging. Possibly, these are not the same as versioning references (at least not directly). Paging could be relevant if there are a lot of updated feature revisions that could be accessed with/collections/{collectionId}/items/{featureId}/versions?limit=10&page=2for example. Theprev/nextwould apply as normal paging links in that context. For the others, it is tricky because arel: startexists, but there is norel: end. I am not quite sure what would be the best way to distinguishfirst/startandlast/??? between versioning/paging concepts and RFC 7089 Memento definitions.Relationship with
datetimeparameter - no versioning parameters?I agree with Relationship to the existing
datetimeparameter and Backwards compatibility thatdatetimeshould not change its meaning and simply interact with the "temporal-validity" concept of the features.However, the lack of a parameter to obtain the older versions can be problematic. For example, if a version used to be valid within a certain time period, and was updated to reflect a change (e.g.: a store that changed owner/name), the older feature would suddenly disappear. There are 2 workarounds.
datetime. Essentially, something similar toversions-as-featuresandversions-as-features-unique-idsprofiles.?revisions=/?version=parameters to allow retrieving older versions of the feature.In case (2), using
/collctions/xx/items?revisions=truecould allow returning all revisions of a feature (with additional filters applicable) rather than only the latest one (default behaviour). Similarly,/collctions/xx/items/{featureId}?version=x.y.zwould select the specific older revision, matching theversionfield in the feature (or the latest if omitted).One important distinction should be that versioned features can employ the same
featureId, and therefore aversionwould also be required to distinguish them. If a distinctfeatureIdis used to encode the different versions (which is also valid, but not the scope of this extension), then the multiple feature revisions would be returned in the full feature listing anyway, anddatetimequeries could already filter them, making the extra versioning somewhat unnecessary/redundant. Therefore, some parameters must be provided to indicate or facilitate the listing of multiple feature revisions, or within a certain "interval of validity". I believe combining?revisions=true&datetime=../..would allow to do this since all valid features within that time interval would be considered, not just the latest revisions.Profiles
Personally, I think
features-with-time-slicesovercomplicates things and should be dropped altogether. I think there are more chances that it confuses users.If a group wants to manage these versioned features separately and all at once, they could simply create a separate collection from them, or employ the versioning endpoint (see below).
Extra Media-Types
The
/collections/{collectionId}/items/{featureId}/versionsendpoint could leverage the fact that it would be a collection of features, so it could reuse the same feature-collection media-types employed by other endpoints.