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

@@ -201,12 +201,30 @@ Distances are WGS84-ellipsoidal (no spherical bias); calibration anchors persist
the dashboard's **KML import** uses this (placemark
names like `12+400` or `12.4` become chainage) (admin)
- `DELETE /api/chainage/points/:id` — remove a point (admin)
- `POST /api/chainage/points/:id` `{note}` — edit a point's note in place; position/chainage
stay immutable (admin). Points carry an `origin` field:
`''` = manual, `'quick'` = generated by the quick assign
(replaced wholesale on the next quick run — identity is
the column, so renaming the note is safe)
- `GET /api/projects/:id/chainage/calibrations` — the saved calibrations, one per road-type group
(`road_type, route_len_m, anchor_count, computed_by,
computed_at`) — every recompute persists one, so any user
sees what's already calibrated (member/admin)
- `POST /api/projects/:id/chainage/recompute` `{video_ids, road_type}` — order the videos into a
route, snap the points, distribute the client-vs-GPS error
piecewise-linearly; writes `chainage_*` (client) +
`sr_chainage_*` (measured, immutable) + `route_seq` (admin)
`sr_chainage_*` (measured, immutable) + `route_seq` (admin).
Summary reports `majority_flipped` + per-video
`against_flow` (opposite to the route's dominant direction —
the only direction flag the UI shows). Warnings include
mixed directions (≥25% against the majority → probably both
carriageways in one group) and ambiguous untagged points
(used by this route but also within 150 m of another
road-type group's videos — tag them)
- `POST /api/projects/:id/chainage/quick` `{video_ids, start_m, end_m, road_type}` — the
two-point case: points at the route ends + same recompute (admin)
two-point case: points at the route's two geometric ends
(notes `quick: chain start/end`, tagged with the group) +
same recompute (admin)
### Env