Skip to content

Add time metric and car and pedestrian profiles to DistanceTool - #207

Merged
esgn merged 3 commits into
mainfrom
138/distance-tool_navigation_modes
Oct 2, 2026
Merged

esgn merged 3 commits into
mainfrom
138/distance-tool_navigation_modes

Conversation

@LionelZoubritzky-IGN

Copy link
Copy Markdown
Contributor

Description

Add time metric and car and pedestrian profiles to DistanceTool

Motivation

This provides the LLM with the capability to evaluate the time it takes to go from one point to another, either by foot or by car. The itinerary itself is not provided (dedicated tool in #191).

Implementation

Use Gpf navigation API. It needs to return a geometry (which is not returned in the current tool), so I opted for "polyline" because it is the most lightweight option.

Testing

npm run build && npm run verify: 599+35 tests all green.

Manual testing on MCP inspector.

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.

@LionelZoubritzky-IGN
LionelZoubritzky-IGN force-pushed the 138/distance-tool_navigation_modes branch from c043953 to 3aead89 Compare October 2, 2026 09:15
@LionelZoubritzky-IGN
LionelZoubritzky-IGN changed the base branch from 138/distance-tool to 138/distance-tool-experiment October 2, 2026 09:15
@LionelZoubritzky-IGN
LionelZoubritzky-IGN force-pushed the 138/distance-tool_navigation_modes branch from 3aead89 to fb4d3f1 Compare October 2, 2026 09:17
Base automatically changed from 138/distance-tool-experiment to 138/distance-tool October 2, 2026 09:33
@LionelZoubritzky-IGN
LionelZoubritzky-IGN force-pushed the 138/distance-tool_navigation_modes branch 2 times, most recently from e142cbf to 5c5a7da Compare October 2, 2026 12:05
Base automatically changed from 138/distance-tool to main October 2, 2026 12:23
@LionelZoubritzky-IGN
LionelZoubritzky-IGN force-pushed the 138/distance-tool_navigation_modes branch from 5c5a7da to 26ea39c Compare October 2, 2026 12:39
@esgn esgn mentioned this pull request Oct 2, 2026
4 tasks done
* 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.
@esgn
esgn merged commit 3ff8020 into main Oct 2, 2026
6 checks passed
@esgn
esgn deleted the 138/distance-tool_navigation_modes branch October 2, 2026 15:20
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