Geometry.MultiCurveZ (Geometry v1.2.0)

View Source

A multi-curve struct, representing a 3D collection of curves.

A MultiCurve is a collection of curves which can include LineStrings, CircularStrings or CompoundCurves.

Summary

Functions

Creates an empty MultiCurveZ.

Creates a MultiCurveZ from the given curves.

Types

curve()

t()

@type t() :: %Geometry.MultiCurveZ{curves: [curve()], srid: Geometry.srid()}

Functions

new()

@spec new() :: t()

Creates an empty MultiCurveZ.

Examples

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

new(curves, srid \\ 0)

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

Creates a MultiCurveZ from the given curves.

Examples

iex> Geometry.MultiCurveZ.new([
...>   Geometry.LineStringZ.new([
...>     Geometry.PointZ.new(0, 0, 1),
...>     Geometry.PointZ.new(5, 5, 2)
...>   ]),
...>   Geometry.CircularStringZ.new([
...>     Geometry.PointZ.new(4, 0, 6),
...>     Geometry.PointZ.new(4, 4, 7),
...>     Geometry.PointZ.new(8, 4, 8)
...>   ])
...> ])
%Geometry.MultiCurveZ{
  curves: [
    %Geometry.LineStringZ{path: [[0, 0, 1], [5, 5, 2]], srid: 0},
    %Geometry.CircularStringZ{arcs: [[4, 0, 6], [4, 4, 7], [8, 4, 8]], srid: 0}
  ],
  srid: 0
}