Route data and calculations
The Route module handles planned paths represented as ordered sequences of waypoints. Routes typically represent intended journeys rather than recorded tracks. Each route can include:
- Ordered list of waypoints (route points)
- Route metadata (name, description, links)
- Distance calculations between points
Route types and operations
Route point is an alias for waypoint
Sourcetype t = {name : string option;cmt : string option;desc : string option;src : string option;links : Link.t list;number : int option;type_ : string option;extensions : Extension.t list;rtepts : point list;
} Route Constructors
Sourceval make_from_coords : name:string -> (float * float) list -> t Create route from coordinate list.
Route Properties
Sourceval name : t -> string option Sourceval description : t -> string option Sourceval source : t -> string option Sourceval type_ : t -> string option Route Modification
Route Analysis
Sourceval to_coords : t -> (float * float) list Extract coordinates from route
Sourceval total_distance : t -> float Calculate total distance between consecutive points in meters
Functional Operations
Sourceval with_description : t -> string -> t Sourceval with_source : t -> string -> t Comparison and Utilities