This defines a interpolate_geometry_from_tstamp(), taking a timestamp
and a maximum timespan in seconds. It will then interpolate a position
at the exact timestamp based on data from real_time_inputs, provided
that the effective interpolation timespan does not exceed the maximum
requested.
Fixes#243.
This defines a replace_placeholders() function, taking as arguments
a text string and either a timestamp or a sequence / point pair. It
uses the latter arguments to find metadata from which it can extract
relevant information and replace it into the text string wherever the
appropriate placeholders appear. For instance, given a call such as
replace_placeholders('The position is @POS@', NULL, 11, 2600) it will
replace '@POS@' with the position of point 2600 in sequence 11, if it
exists (or leave the placeholder untouched otherwise).
A scan_placeholders() procedure is also defined, which calls the above
function on the entire event log.
Fixes#229.
This adds event_position() and event_meta() functions which are used
to retrieve position or metadata, respectively, given either a timestamp
or a sequence / point pair. Intended to be used in the context of #229.
* Adds label_in_sequence() function
NOTE: This function is already defined in schema-template.sql but
seemingly never got pushed into production.
Fixes#211.
Drops the old event tables.
NOTE: consider not applying this patch until confident that
the migration has proceeded smoothly. Dougal can operate just
fine without it.
Resolve "Make event log entries for start and end of line upon import of final sequence, if the entries do not already exist"
Closes#57
See merge request wgp/dougal/software!11
These files contain the sequence of SQL commands needed to bring
a database or project schema up to date with the latest template
database or project schema.
These files must be applied manually. Check the comments at the top of
the file for instructions.
Adds:
* label_in_sequence (_sequence integer, _label text):
Returns events containing the specified label.
* handle_final_line_events (_seq integer, _label text, _column text):
- If _label does not exist in the events for sequence _seq:
it adds a new _label label at the shotpoint obtained from
final_lines_summary[_column].
- If _label does exist (and hasn't been auto-added by this function
in a previous run), it will add information about it to the final
line's metadata.
* final_line_post_import (_seq integer):
Calls handle_final_line_events() on the given sequence to check
for FSP, FGSP, LGSP and LSP labels.
* events_seq_labels_single ():
Trigger function to ensure that labels that have the attribute
`model.multiple` set to `false` occur at most only once per
sequence. If a new instance is added to a sequence, the previous
instance is deleted.
* Trigger on events_seq_labels that calls events_seq_labels_single().
* Trigger on events_timed_labels that calls events_seq_labels_single().