Versioning of maps (Track changes)

Tracking changes keeps the full transaction history in the actual table. This enables users to go back in history and see how a layer looked at a particular time. Also it works as a log of all transactions made on the layer.

A versioned layer acts like all other layers and can be edited in the normal way. Ramani Cloud takes care of versioning in the background.

Versioning takes place in the WFS service layer. That is, it works both when editing in Ramani Cloud's Map tab, but also through external WFS editors such as QGIS.

Start "Tracking changes" on a layer

  1. Select the layer by clicking on the line so its becomes gray.
  2. Click "Start track changes".

New system fields in the layer table

The layer table gets five new system fields (system fields always start with "rc_"). The Fields containing version maps for each feature in the table. System fields are:

rc_versions_gid This means that the two versions of this same feature has the same key value.

rc_version_start_date A timestamp indicating when the version was created. All features have a value in this field.

rc_version_end_date A timestamp indicating when the version is ended. Only finalized versions have a value in this field and the current version has no value in this field.

rc_version_uuid A "universally unique identifier" that all versions are asigned. This value is global unique.

rc_version_user The (sub-) user who created the version.

Version maps in the table

This is an example of the version maps in the table. This versioned table has three new features, each with date time of creation (rc_version_start_date), a unique identifier (rc_version_uuid) and the user who created the feature (rc_version_user).

Load all versions

By default, only current features, ie those without a rc_version_end_date, is loaded in the online editor. It is possible to load all the version at once.

  1. Start editing the layer.
  2. Select "all" under "Time slicing" that should be checked in the box.
  3. Load features.

This example shows two current points. Furthermore, it is seen that the point with rc_version_gid=2 is available in two versions: A current and an ended. That is, the point has been edited. The point with rc_version_gid=1 is ended and there is no other versions of this feature. This means that the feature is deleted.

Ended versions are shown with red, dashed border. These can not be edited.

Time slicing

It is possible to see how a layer looked at a particular time in history.

  1. Start editing the layer.
  2. Check the "Time slicing" box and write a date/time in the format "yyyy-mm-dd hh:mm:ss" eg 2015-06-30 14:34:00. If you omit the time it will be set to 00:00:00.
  3. Load features.

Time slicing loads the version of the features that was current at the given date/time. This means that there will only appear one version per feature (the rc_version_gid values are unique). The example shows that there were three current points at the date/time, one of which is still current (the blue) and two, which subsequently have been modified or deleted (red). For the modified features the rc_version_end_date value will show date and time of the change.

Track changes in external editors such as QGIS

Versioning takes place in the WFS service layer. This means that it works both when editing in Ramani Cloud's Map tab, but also through external WFS editors such as QGIS.

Using the standard WFS connection string displays only the current versions. That is, this is no different than for non-versioned layers:

http://example.com/wfs/mydb/public/4326

If all versions is required to be loaded in QGIS, when use this string:

http://example.com/wfs/mydb/public/4326/all

And if Time slicing is required, this can be used:  (Notice the "T" between the date and time)

http://example.com/wfs/mydb/public/4326/2015-06-30T14:34:00

0 Comments

Add your comment

E-Mail me when someone replies to this comment