Skip to content

138/review and fix - #208

Merged
LionelZoubritzky-IGN merged 5 commits into
138/distance-tool_navigation_modesfrom
138/review-and-fix
Oct 2, 2026
Merged

LionelZoubritzky-IGN merged 5 commits into
138/distance-tool_navigation_modesfrom
138/review-and-fix

Conversation

@esgn

@esgn esgn commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Description

Adds the car and pedestrian profiles to the distance tool (the two commits of #207), with the review fixes on top.

Related issues (if applicable)

Supersedes #207

Motivation

Lets the LLM estimate a travel time on foot or by car between two points, consistent with the travel_time_filter isochrones.

Implementation

  • Itineraries come from the Géoplateforme navigation service, through the rate limiter shared with the isochrones.
  • bdtopo-valhalla replaces bdtopo-osrm: it is the engine of the isochrones, so both report the same travel times (OSRM differed by 2 to 12%).
  • time keeps a tenth of a minute, and distance is rounded to the centimeter, like the other profiles.
  • Restores the ellipsoidal precision wording ("0.5cm") that the rebase had reverted.

Testing

  • npm run verify:fast green.
  • Live check of the e2e scenario (Lux cinema in Caen to the Sivom pool in Mondeville, on foot): 29.4 min with Valhalla, against 32.7 min with OSRM.

TODOs

Checklist

  • The PR is focused and of a reasonable size.
  • The commit history is clean.
  • Relevant documentation has been updated.
  • Relevant tests have been added or updated.

esgn added 5 commits October 2, 2026 16:24
The distance tool used bdtopo-osrm while travel_time_filter isochrones use bdtopo-valhalla, so the two could disagree by up to 12% on walking times. Reuse TRAVEL_TIME_RESOURCE for the itinerary.
The rebase brought back "plus précise et coûteuse, précision à 1mm" instead of the 0.5 cm wording merged in #183, and the new ", " join produced "suivi :, `spherical`". Join the profile lines as before.
Rounding to the whole minute turned a 40-second walk into 1 or even 0 minutes.
`profile` always has a value (`spherical` by default), so "lorsqu'un profil est renseigné" was always true.
The spherical and ellipsoidal profiles already round to the centimeter; the itinerary passed the service value through as is.
@esgn
esgn changed the base branch from main to 138/distance-tool_navigation_modes October 2, 2026 14:44
@LionelZoubritzky-IGN
LionelZoubritzky-IGN merged commit 3a10440 into 138/distance-tool_navigation_modes Oct 2, 2026
6 checks passed
@LionelZoubritzky-IGN
LionelZoubritzky-IGN deleted the 138/review-and-fix branch October 2, 2026 15:01
esgn added a commit that referenced this pull request Oct 2, 2026
…l` (#207)

* feat: Implement itinerary services

* feat: plug itinerary into distance tool

* 138/review and fix (#208)

* fix(itinerary): route with Valhalla, like the travel time isochrones

The distance tool used bdtopo-osrm while travel_time_filter isochrones use bdtopo-valhalla, so the two could disagree by up to 12% on walking times. Reuse TRAVEL_TIME_RESOURCE for the itinerary.

* fix(distance): restore the ellipsoidal precision lost in the rebase

The rebase brought back "plus précise et coûteuse, précision à 1mm" instead of the 0.5 cm wording merged in #183, and the new ", " join produced "suivi :, `spherical`". Join the profile lines as before.

* fix(distance): keep a tenth of a minute in the travel time

Rounding to the whole minute turned a 40-second walk into 1 or even 0 minutes.

* docs(distance): say which profiles return a travel time

`profile` always has a value (`spherical` by default), so "lorsqu'un profil est renseigné" was always true.

* fix(distance): round the itinerary distance to the centimeter

The spherical and ellipsoidal profiles already round to the centimeter; the itinerary passed the service value through as is.

---------

Co-authored-by: Emmanuel S. <5435148+esgn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants