Geometry.CircularStringM (Geometry v1.2.0)

View Source

A circular-string struct, representing a 2D curve with a measurement.

A non-empty circular-string requires at least three coordinates. In a sequence of arcs the end point of the previous arc is the start point of the next arc, just like the segments of a LineString. This means that a CircularString must have an odd number of points greater than 1.

Summary

Functions

Creates an empty CircularStringM.

Creates a CircularStringM from the given Geometry.PointMs.

Types

t()

@type t() :: %Geometry.CircularStringM{arcs: Geometry.arcs(), srid: Geometry.srid()}

Functions

new()

@spec new() :: t()

Creates an empty CircularStringM.

Examples

iex> CircularStringM.new()
%CircularStringM{arcs: [], srid: 0}

new(arcs, srid \\ 0)

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

Creates a CircularStringM from the given Geometry.PointMs.

Examples

iex> CircularStringM.new(
...>   [PointM.new(1, 2, 3), PointM.new(3, 4, 5), PointM.new(5, 6, 7)])
%CircularStringM{arcs: [[1, 2, 3], [3, 4, 5], [5, 6, 7]], srid: 0}