Geometry.LineStringZ (Geometry v1.1.0)

View Source

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

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

Summary

Functions

Creates an empty LineStringZ.

Creates a LineStringZ from the given Geometry.PointZs.

Types

t()

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

Functions

new()

@spec new() :: t()

Creates an empty LineStringZ.

Examples

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

new(path, srid \\ 0)

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

Creates a LineStringZ from the given Geometry.PointZs.

Examples

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