trails/openspec/specs/no-go-areas/spec.md
Ullrich Schäfer 3abea9d5a8
Pass no-go area polygons natively to BRouter
BRouter supports a `polygons` parameter with full vertex coordinates.
We were approximating polygons as circles (centroid + max radius),
which poorly represented elongated or concave shapes.

Now passes polygon vertices directly — no approximation, exact
no-go boundaries.

Also removes unused haversineMeters helper and updates the spec.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 10:31:43 +01:00

728 B

Requirements

Requirement: Draw no-go areas

Users SHALL be able to draw polygons on the map that BRouter avoids when computing routes.

Scenario: Draw polygon

  • WHEN a user activates the no-go area tool and draws a polygon on the map
  • THEN the polygon is added to the Yjs doc and visible to all participants

Scenario: Route avoids no-go area

  • WHEN a route is computed and a no-go area intersects the direct path
  • THEN BRouter request includes the polygon vertices via the polygons parameter
  • AND BRouter routes around the no-go area

Scenario: Delete no-go area

  • WHEN a user deletes a no-go area polygon
  • THEN it is removed from the Yjs doc and the route is recomputed