Geometry.CompoundCurveM
(Geometry v1.2.0)
View Source
A compound-curve struct, representing a 2D curve with a measurement.
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.LineStringM.t() | Geometry.CircularStringM.t()
@type t() :: %Geometry.CompoundCurveM{segments: [segment()], srid: Geometry.srid()}
Functions
@spec new() :: t()
Creates an empty CompoundCurveM.
Examples
iex> Geometry.CompoundCurveM.new()
%Geometry.CompoundCurveM{segments: [], srid: 0}
@spec new([segment()], Geometry.srid()) :: t()
Creates a CompoundCurveM from the given segments.
Examples
iex> Geometry.CompoundCurveM.new([
...> Geometry.LineStringM.new([
...> Geometry.PointM.new(1, 0, 5),
...> Geometry.PointM.new(0, 1, 6)
...> ])
...> ])
%Geometry.CompoundCurveM{
segments: [%Geometry.LineStringM{path: [[1, 0, 5], [0, 1, 6]], srid: 0}],
srid: 0
}