chainage compute and map view

This commit is contained in:
2026-07-08 17:03:24 +05:30
parent 78b1666402
commit e7ab0f3368
9 changed files with 622 additions and 78 deletions

View File

@@ -291,6 +291,10 @@ CREATE TABLE IF NOT EXISTS chainage_points (
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE INDEX IF NOT EXISTS idx_chainage_points_project ON chainage_points(project_id);
-- origin marks generated points ('quick' = the two-point quick assign) so they can
-- be replaced on the next quick run regardless of the (freely editable) note text.
ALTER TABLE chainage_points ADD COLUMN IF NOT EXISTS origin TEXT NOT NULL DEFAULT '';
UPDATE chainage_points SET origin='quick' WHERE origin='' AND note LIKE 'quick:%';
ALTER TABLE videos ADD COLUMN IF NOT EXISTS chainage_start_m DOUBLE PRECISION;
ALTER TABLE videos ADD COLUMN IF NOT EXISTS chainage_end_m DOUBLE PRECISION;
ALTER TABLE videos ADD COLUMN IF NOT EXISTS sr_chainage_start_m DOUBLE PRECISION;