Geometry.CompoundCurveZM (Geometry v1.2.0)

View Source

A compound-curve struct, representing a 4D 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 CompoundCurveZM.

Creates a CompoundCurveZM from the given segments.

Types

segment()

t()

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

Functions

new()

@spec new() :: t()

Creates an empty CompoundCurveZM.

Examples

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

new(segments, srid \\ 0)

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

Creates a CompoundCurveZM from the given segments.

Examples

iex> Geometry.CompoundCurveZM.new([
...>   Geometry.LineStringZM.new([
...>     Geometry.PointZM.new(1, 0, 1, 5),
...>     Geometry.PointZM.new(0, 1, 2, 6)
...>   ])
...> ])
%Geometry.CompoundCurveZM{
  segments: [%Geometry.LineStringZM{path: [[1, 0, 1, 5], [0, 1, 2, 6]], srid: 0}],
  srid: 0
}