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

Functions

Creates an empty CompoundCurveZ.

Creates a CompoundCurveZ from the given segments.

Types

segment()

t()

@type t() :: %Geometry.CompoundCurveZ{segments: [segment()], srid: Geometry.srid()}

Functions

new()

@spec new() :: t()

Creates an empty CompoundCurveZ.

Examples

iex> Geometry.CompoundCurveZ.new()
%Geometry.CompoundCurveZ{segments: [], srid: 0}

new(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
}