Geometry.CompoundCurveZ
(Geometry v1.2.0)
View Source
A compound-curve struct, representing a 3D curve.
A CompoundCurve is a single continuous curve that may contain both CircularString segments and LineString segments. Each segment must connect to the next segment (the end point of one segment must equal the start point of the next segment).
Summary
Types
@type segment() :: Geometry.LineStringZ.t() | Geometry.CircularStringZ.t()
@type t() :: %Geometry.CompoundCurveZ{segments: [segment()], srid: Geometry.srid()}
Functions
@spec new() :: t()
Creates an empty CompoundCurveZ.
Examples
iex> Geometry.CompoundCurveZ.new()
%Geometry.CompoundCurveZ{segments: [], srid: 0}
@spec new([segment()], Geometry.srid()) :: t()
Creates a CompoundCurveZ from the given segments.
Examples
iex> Geometry.CompoundCurveZ.new([
...> Geometry.LineStringZ.new([
...> Geometry.PointZ.new(1, 0, 1),
...> Geometry.PointZ.new(0, 1, 2)
...> ])
...> ])
%Geometry.CompoundCurveZ{
segments: [%Geometry.LineStringZ{path: [[1, 0, 1], [0, 1, 2]], srid: 0}],
srid: 0
}