Geometry.LineString (Geometry v1.1.0)
View SourceA line-string struct, representing a 2D line.
A non-empty line-string requires at least two points.
Summary
Types
@type t() :: %Geometry.LineString{path: Geometry.path(), srid: Geometry.srid()}
Functions
@spec new() :: t()
Creates an empty LineString
.
Examples
iex> LineString.new()
%LineString{path: [], srid: 0}
@spec new([Geometry.Point.t()], Geometry.srid()) :: t()
Creates a LineString
from the given Geometry.Point
s.
Examples
iex> LineString.new([Point.new(1, 2), Point.new(3, 4)])
%LineString{path: [[1, 2], [3, 4]], srid: 0}