Commit Graph

7 Commits

Author SHA1 Message Date
D. Berge
2ee9b0cac8 Add midnight shot synthetic event.
It inserts `LDSP` and `FDSP` labels, if those exist
in the `labels` table, on the last and first shotpoints
of the day when a sequence is shot through midnight.

The server timezone is always set to UTC so the midnight
shot implicitly refers to UTC through this.
2020-08-13 23:44:25 +02:00
D. Berge
8ea220d09e Add info on etc/db files 2020-08-12 14:24:10 +02:00
D. Berge
c7b6f259cb Add btree_gist extension to database template 2020-08-12 14:02:40 +02:00
D. Berge
9871aebde6 Add event tables and views.
Events can be associated either with a timestamp *or* with a
sequence + shotpoint (but not both, for data integrity reasons).

Events and shotpoints can also have “labels” associated with them.
The difference between a comment and a label is that the former
is free text while the latter is predefined and has associated
properties (currently only for display, but could also have QC
related properties such as ensuring that there is only one “FSP”
label per sequence and so on).

The `events` view puts everything together into a coherent view.
Note that this view may produce multiple rows for the same
timestamp or shotpoint, for instance when the event has both
a text comment and one or more labels.
2020-08-12 11:24:52 +02:00
D. Berge
e4c512f3a2 Add raw data summary views.
The raw_lines_summary and raw_lines_summary_geometry
views are analogous to final_lines_summary and
final_lines_summary_geometry respectively.

One difference of note is that the final_ version
may report negative missing shots, while the raw_
versions assume that the user is not interested in
anything outside the preplot.
2020-08-11 15:35:39 +02:00
D. Berge
09e5d9048a Update SQL schema.
- The raw_shots and final_shots tables contain *shots*,
  as the name says, and nothing else.

- The objref is made an integer. This is consistent with
  P1/11 usage and for anything else a relation can be used.

- Raw and final shot tables also include the corresponding
  preplot line as well as the shot number. The preplot line
  is explicit in the P1/11s that we have seen and can otherwise
  be derived from the source geometry in the P1/11 or P1/90
  headers (provided those headers are correct). It is the
  import process' business to figure out what the preplot
  lines are if those are not explicitly given in the data.

- As a result of the above, some of the views have been
  re-written, hopefully in a simpler way.

- The shot_count view has been removed as it was neither used
  nor useful.
2020-08-10 22:43:07 +02:00
D. Berge
4c5d29494c Initial commit 2020-08-08 23:59:13 +02:00