View Source Geometry.LineStringM (Geometry v0.4.0)

A line-string struct, representing a 2D line with a measurement.

A none empty line-string requires at least two points.

Link to this section Summary

Functions

Creates an empty LineStringM.

Creates a LineStringM from the given Geometry.PointMs.

Link to this section Types

@type t() :: %Geometry.LineStringM{points: Geometry.coordinates()}

Link to this section Functions

@spec new() :: t()

Creates an empty LineStringM.

examples

Examples

iex> LineStringM.new()
%LineStringM{points: []}
@spec new([Geometry.PointM.t()]) :: t()

Creates a LineStringM from the given Geometry.PointMs.

examples

Examples

iex> LineStringM.new([PointM.new(1, 2, 4), PointM.new(3, 4, 6)])
%LineStringM{points: [[1, 2, 4], [3, 4, 6]]}