Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C chouette-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 36
    • Merge requests 36
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Administrator
  • chouette-core
  • Merge requests
  • !379

Merged
Created Mar 13, 2018 by Administrator@rootMaintainer

6095 route calculate distance and time cost between stops

  • Overview 6
  • Commits 27
  • Changes 19

Created by: teddywing

Calculate distance and time costs between each stop in a Chouette::Route.

When a Chouette::Route is saved, its "way costs" will be calculated and saved into a new JSON field in the routes table called costs. The costs field is supposed to model the structure of journey_patterns.costs. In order to calculate costs, we make a request to the TomTom API (https://developer.tomtom.com/online-routing/online-routing-documentation/batch-routing) and save the distances and times it gives us. In order to be able to calculate costs, the route's StopAreas must have latitude and longitude values.

The cost data will be used to pre-fill the fields in the edit view of http://stif-boiv.dev:3000/referentials/4/lines/1857/routes/1/journey_patterns_collection

Refer to this doc to configure the TomTom API key: https://github.com/af83/chouette-its-doc/blob/5c97a55546a6bb21c32b271abb6c706bdadd0930/tomtom.md

I recommend reviewing this with https://github.com/af83/stif-boiv/pull/379/files?w=1

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: 6095-route--calculate-distance-and-time-cost-between-stops