Geometry.CircularStringZ (Geometry v1.2.0)

View Source

A circular-string struct, representing a 3D curve.

A non-empty circular-string requires at least three coordinates. In a sequence of arcs the end point of the previous arc is the start point of the next arc, just like the segments of a LineString. This means that a CircularString must have an odd number of points greater than 1.

Summary

Functions

Creates an empty CircularStringZ.

Creates a CircularStringZ from the given Geometry.PointZs.

Types

t()

@type t() :: %Geometry.CircularStringZ{arcs: Geometry.arcs(), srid: Geometry.srid()}

Functions

new()

@spec new() :: t()

Creates an empty CircularStringZ.

Examples

iex> CircularStringZ.new()
%CircularStringZ{arcs: [], srid: 0}

new(arcs, srid \\ 0)

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

Creates a CircularStringZ from the given Geometry.PointZs.

Examples

iex> CircularStringZ.new(
...>   [PointZ.new(1, 2, 3), PointZ.new(3, 4, 5), PointZ.new(5, 6, 7)])
%CircularStringZ{arcs: [[1, 2, 3], [3, 4, 5], [5, 6, 7]], srid: 0}