-
Notifications
You must be signed in to change notification settings - Fork 6
[Archived] Routeify Design Proposal
Eddy Ionescu edited this page Jul 8, 2018
·
1 revision
Routeify is a library that will be part of Tryn-API. It'll do stuff related to routes.
Given coordinates and a route defined in a geoJSON file: https://github.com/trynmaps/tryn-react/blob/master/src/res/muniRoutes.geo.json
- "Snap" coordinates onto a route.
- Measure the distance between coordinates along a route.
- Sort coordinates based on how close they are along to the route's starting point.
- Combine overlapping edges (an edge would be treated as a line), where for any overlap between any two edges, a new edge with the average value of the two is created.
Turf.JS - http://turfjs.org https://github.com/Turfjs/turf
TODO - Describe how these functions will be used
- http://turfjs.org/Docs#nearestPointOnLine
- http://turfjs.org/Docs#lineSlice
- http://turfjs.org/Docs#lineSlice and http://turfjs.org/Docs#distance
- http://turfjs.org/Docs#lineOverlap
[TBD] Routeify will be directly required by Tryn-API. Tryn-API's Readme will be updated to specify that Routeify has to be cloned in the same parent directory. It could also live in a folder inside Tryn-API.
- Node.JS
(add your name with relevant comments and whether it should move forward)