Geometry.LineStringM (Geometry v1.1.1)

View Source

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

A non-empty line-string requires at least two path.

Summary

Functions

Creates an empty LineStringM.

Creates a LineStringM from the given Geometry.PointMs.

Types

t()

@type t() :: %Geometry.LineStringM{path: Geometry.path(), srid: Geometry.srid()}

Functions

new()

@spec new() :: t()

Creates an empty LineStringM.

Examples

iex> LineStringM.new()
%LineStringM{path: [], srid: 0}

new(path, srid \\ 0)

@spec new([Geometry.PointM.t()], Geometry.srid()) :: t()

Creates a LineStringM from the given Geometry.PointMs.

Examples

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