Geometry.LineStringZM (Geometry v1.1.0)

View Source

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

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

Summary

Functions

Creates an empty LineStringZM.

Creates a LineStringZM from the given Geometry.PointZMs.

Types

t()

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

Functions

new()

@spec new() :: t()

Creates an empty LineStringZM.

Examples

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

new(path, srid \\ 0)

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

Creates a LineStringZM from the given Geometry.PointZMs.

Examples

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