Commit Graph

1516 Commits

Author SHA1 Message Date
D. Berge
9fa2b92d36 Remove debugging statement 2020-08-11 15:41:34 +02:00
D. Berge
cc156ab563 Remove commented out code 2020-08-11 15:41:12 +02:00
D. Berge
c661a7849a Return full line summary info for raw lines GIS endpoint 2020-08-11 15:38:39 +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
40f25287cb Adapt API GIS functions to latest database schema 2020-08-10 23:02:58 +02:00
D. Berge
9c58ec30b5 Add function to import final P1/11.
Based on the analogous import_final_p190.py code.
2020-08-10 22:58:31 +02:00
D. Berge
3755564414 Add function to import raw P1/11.
Based on the analogous import_raw_p190.py code.
2020-08-10 22:58:31 +02:00
D. Berge
4c54b7002a Add DB functions to save raw and final data from P1/11 2020-08-10 22:58:31 +02:00
D. Berge
b36c8b97d1 Add P1/11 parsing Python library.
This is a super-simple library that does the minimum required
to get things going for the specific operations where this
code is foreseen to be used in the immediate future. It is not
and it does not aim to be a complete, generic or universal P1/11
parsing solution.
2020-08-10 22:50:07 +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
a0faa51602 Fix PREFIX usage 2020-08-10 22:41:37 +02:00
D. Berge
ba9b2e66c7 Add client dist/ final location to .gitignore 2020-08-09 16:47:56 +02:00
D. Berge
ed6b051669 Add DOUGAL_ROOT environment variable support.
When searching for configuration files, we look in the
following places:

1. $DOUGAL_ROOT/etc/
2. $HOME/software/etc/
3. ./software/etc/
2020-08-09 16:43:51 +02:00
D. Berge
36596da46b Add __pycache__/ to .gitignore 2020-08-09 16:43:51 +02:00
D. Berge
a766a4dc6c Let API run with default settings in dev mode.
If the configuration file is not found, either at its
default place ($HOME/etc/www/config.json) or wherever
indicated by the DOUGAL_API_CONFIG environment variable,
create a temporary default config and try to run with it.

On the other hand, if we are in production (NODE_ENV == production)
we exit with non-zero in the absence of a real configuration file.
2020-08-09 10:50:53 +02:00
D. Berge
4c5d29494c Initial commit 2020-08-08 23:59:13 +02:00