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>
This commit is contained in:
Ullrich Schäfer 2026-04-03 10:31:43 +01:00
parent d2ff488f37
commit 3abea9d5a8
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9
2 changed files with 7 additions and 27 deletions

View file

@ -9,7 +9,8 @@ Users SHALL be able to draw polygons on the map that BRouter avoids when computi
#### Scenario: Route avoids no-go area
- **WHEN** a route is computed and a no-go area intersects the direct path
- **THEN** BRouter routes around the no-go area
- **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