Skip to content

routing: unify snapping/routing semantics across single-route and batch APIs #2

@blackopsrepl

Description

@blackopsrepl

Problem

The library currently uses different routing models in different places:

  • route / route_with use nearest-node snapping.
  • compute_matrix uses edge snapping.
  • compute_geometries delegates to route, so geometries and matrix values can disagree.

Why this matters

Callers can get inconsistent durations, distances, and route shapes for the same input coordinates depending on which API they use.

Scope

  • Decide on a canonical routing model for public APIs.
  • Either migrate all route APIs to edge-snapped routing or expose clearly separate node-snapped and edge-snapped families.
  • Ensure batch geometry generation uses the same semantics as matrix generation.

Acceptance criteria

  • Public routing APIs have consistent snapping semantics.
  • Matrix and geometry batch methods agree with single-route methods for the same inputs.
  • Tests cover consistency across API surfaces.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions