package mlgpx

  1. Overview
  2. Docs

Module Track.SegmentSource

Sourcetype t = segment
Sourceval empty : t

Create empty segment

Sourceval make : point list -> t

Create segment with points

Sourceval make_from_coords : (float * float) list -> t

Create segment from coordinate list.

Sourceval points : t -> point list

Get points

Sourceval point_count : t -> int

Get point count

Sourceval extensions : t -> Extension.t list

Get extensions

Sourceval add_point : t -> point -> t

Add point

Sourceval add_points : t -> point list -> t

Add points

Sourceval to_coords : t -> (float * float) list

Extract coordinates

Sourceval distance : t -> float

Calculate segment distance in meters

Sourceval is_empty : t -> bool

Check if empty

Sourceval first_point : t -> point option

First point

Sourceval last_point : t -> point option

Last point

Sourceval compare : t -> t -> int

Compare segments

Sourceval equal : t -> t -> bool

Test segment equality

Sourceval pp : Format.formatter -> t -> unit

Pretty print segment

OCaml

Innovation. Community. Security.