Skip to content

Intrinsic Analysis #1074

Description

@philipbaileynar

Continuation of #960...

The central idea of system protocol and intrinsic metrics is a good one. However, folks want to quickly calculate these metrics without the burden of having to create a DCE first.

Proposal

What if we drop the requirement to have an event_id in the metric_values table? i.e. event_id would be allowed to be NULL. This would allow a single metric value for each metric in each sample frame polygon for each analysis. This "null event" set of metrics would be for intrinsic metrics. They ignore time and just capture the system protocol intrinsic metric values.

Image

Phase 2

We could have a simplified "Create Intrinsic Analysis" workflow that only requires a sample frame, riverscape, centreline and DEM (i.e. no data capture event or need to pick protocols etc). This fast tracks getting to the analysis.

Rationale

This solution would provide an early opportunity to introduce new users to analyses in a simplified way that's easy to learn. Later when we teach them about full blown analyses the concepts will be familiar and they will be able to handle the more complicated UI.

Technical Details

Technically this is a relaxation of a database rule, so it should be fairly safe. But it is risky...

If we are using SQLite >= 3.35 then we can directly drop the NOT NULL constraint:

ALTER TABLE table_name ALTER COLUMN column_name DROP NOT NULL;

However, if we are using older SQLite then can't alter the metric_values table in existing projects and will need to drop and recreate them, carefully transferring all the data:

  1. SELECT existing metric_values data into temp table
  2. DROP existing metric_values table
  3. CREATE new metric_values table with new constraints and relationships
  4. INSERT metric values into new table from temp table
  5. DROP temp table

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions