Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

limited OSRM native routing API #98

Merged
merged 7 commits into from
Jan 24, 2024

Conversation

XavDmz
Copy link
Collaborator

@XavDmz XavDmz commented Jan 22, 2024

Limited OSRM native routing API for road2

Linked to issue #87.
This PR covers only routing request and responses with OSRM formalism, and using an OSRM source engine.

OSRM query parameters, mandatory or not, are used if they already had an equivalent in road2's code.
Other optional parameters are ignored.
Aside from these ignored paramters, the request and response are compatible with OSRM specifications.

routeRequest has been updated with a property named engineExtras, a dictionary designed to contain engine response properties used by an API other than "simple". As an example, OSRM waypoint's distance to requested coordinates is such a property.
osrmSource has been updated to set routeRequest.engineExtras with this kind of additional properties, necesssary to craft OSRM native API response.

…rameters, and ignored when not. OSRM controller's writeRouteResponse is being implemnted, but it will need modifications of RouteResponse class.
…. Slight edition of routeResponse and osrmSource classes to do so.
TODO :
* complete logging and varible check
* test the code
* check result to see if every property is valid and exact.
* adapt getcapabilities to OSRM API capabilities.
@XavDmz XavDmz added the enhancement New feature or request label Jan 22, 2024
@XavDmz XavDmz requested review from lgrd and azarz January 22, 2024 12:56
@XavDmz XavDmz assigned lgrd and azarz Jan 22, 2024
@XavDmz
Copy link
Collaborator Author

XavDmz commented Jan 22, 2024

The current state (d9d931b) has only been testing on a singular routing request, with intermediates coordinates / waypoints.
The getcapabilties functionality, and both user and developper documentation, have not yet been updated.
The former needs a rework to generate the GetCapabilities content dynamically, which will allow for easier porting to other APIs, as well as live update of capabilties description.

Copy link
Member

@azarz azarz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me!

Copy link
Collaborator

@lgrd lgrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ! ;)

@lgrd lgrd merged commit f249ca2 into IGNF:feat/native_motors_api Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants