Liking cljdoc? Tell your friends :D

hiposfer.kamal.services.routing.directions

collection of functions to provide routing directions based on Open Street Maps and General Transit Feed Specification data. It follows (as close as possible) the MapBox v5 directions specification.

The algorithm provides a single route between the first and last coordinate. It works as follows:

  • create a Dijkstra collection to find the shortest path
  • take the sequence and split it into 'pieces'
  • each piece is a subsection of the complete route with a common 'context'. The 'context' is the road name or the stop name
  • loop over the pieces to create instructions based on each previous, current and next piece
collection of functions to provide routing directions based on Open Street
Maps and General Transit Feed Specification data. It follows (as close
as possible) the MapBox v5 directions specification.

The algorithm provides a single route between the first and last coordinate.
It works as follows:
- create a Dijkstra collection to find the shortest path
- take the sequence and split it into 'pieces'
 - each piece is a subsection of the complete route with a common 'context'.
  The 'context' is the road name or the stop name
- loop over the pieces to create instructions based on each previous, current
  and next piece
raw docstring

->coordinatesclj

source

bearing-turnsclj

source

directionclj

(direction network params)

given a network and a sequence of keywordized parameters according to https://www.mapbox.com/api-documentation/#retrieve-directions returns a directions object similar to the one from Mapbox directions API

Example: (direction network :coordinates [{:lon 1 :lat 2} {:lon 3 :lat 4}]

given a network and a sequence of keywordized parameters according to
https://www.mapbox.com/api-documentation/#retrieve-directions
returns a directions object similar to the one from Mapbox directions API

Example:
(direction network :coordinates [{:lon 1 :lat 2} {:lon 3 :lat 4}]
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close