View Source Geometry.LineStringZ (Geometry v0.4.0)

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

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

Link to this section Summary

Functions

Creates an empty LineStringZ.

Creates a LineStringZ from the given Geometry.PointZs.

Link to this section Types

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

Link to this section Functions

@spec new() :: t()

Creates an empty LineStringZ.

examples

Examples

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

Creates a LineStringZ from the given Geometry.PointZs.

examples

Examples

iex> LineStringZ.new([PointZ.new(1, 2, 3), PointZ.new(3, 4, 5)])
%LineStringZ{points: [[1, 2, 3], [3, 4, 5]]}