How the detour is actually calculated
Asking a router politely for a different road does not work. Here is the geometry FlockDetour hands the routing engine to make a genuinely different line come back.
The naive way to build a privacy detour is to ask the routing engine for several alternatives and pick whichever one passes the fewest cameras. We tried that first. It mostly does not work, because inside a city a router will often return exactly one route, and scoring a list of one gets you the road you were already on.
What produces a different line is telling the router where it may not go.
No-go boxes, not preferences
FlockDetour converts the cameras along a candidate route into explicit exclusion polygons and re-asks. Each camera becomes a small box the router must route around — not a penalty it can weigh against time, but a hole in the map.
The box is 55 metres to a side of the camera. That number is a compromise between two failure modes:
- Too narrow and the box misses the road. A roadside pole sits some distance off the centerline that OpenStreetMap draws, and a crowd-sourced position carries its own drift. A box that does not intersect the road edge excludes nothing.
- Too wide and it walls off the neighbourhood. Push the box out far enough and you have not avoided a camera, you have closed a city block, and the detour that comes back is absurd.
Cameras closer together than that same 55 metres share a single box instead of each getting their own — an intersection with readers on three corners is one obstacle, not three.
Two limits the algorithm respects
Routing engines have their own constraints, and a request that violates them fails outright rather than degrading. FlockDetour stays inside two:
- At most 40 boxes per request. Beyond that the request gets slow without getting better.
- A capped total perimeter. Valhalla rejects an entire request once the summed circumference of the exclusion shapes gets too large — the error is not a worse route, it is no route. We cap well under the engine's own ceiling, and when a corridor is dense enough to exceed it, we drop the boxes around the least-exposed cameras first.
That last rule is the important one. Losing the box on a minor camera is a small loss. Losing the route is a total one.
The design goal is not the theoretically optimal path. It is a route that comes back, every time, and is honestly described.
What you see
The result is always presented as a comparison: the fastest route, the detour, and the difference between them in minutes and in known cameras passed. If the detour costs eleven minutes to avoid two readers, the app says so and lets you take the fast one.
There is no mode that hides the cost, because the cost is the decision.