Geometry.MultiPointZM (Geometry v1.1.0)
View SourceA set of points from type Geometry.PointZM
.
MultiPointZM
implements the protocols Enumerable
and Collectable
.
Examples
iex> Enum.map(
...> MultiPointZM.new([
...> PointZM.new(1, 2, 3, 4),
...> PointZM.new(3, 4, 5, 6)
...> ]),
...> fn [x, _y, _z, _m] -> x end
...> )
[1, 3]
iex> Enum.into([PointZM.new(1, 2, 3, 4)], MultiPointZM.new())
%MultiPointZM{points: [[1, 2, 3, 4]]}
Summary
Types
@type t() :: %Geometry.MultiPointZM{ points: [Geometry.coordinates()], srid: Geometry.srid() }
Functions
@spec new() :: t()
Creates an empty MultiPointZM
.
Examples
iex> MultiPointZM.new()
%MultiPointZM{}
@spec new([Geometry.PointZM.t()], Geometry.srid()) :: t()
Creates a MultiPointZM
from the given Geometry.PointZM
s.
Examples
iex> MultiPointZM.new([
...> PointZM.new(1, 2, 3, 4),
...> PointZM.new(3, 4, 5, 6)
...> ])
%MultiPointZM{points: [[1, 2, 3, 4], [3, 4, 5, 6]], srid: 0}
iex> MultiPointZM.new([])
%MultiPointZM{}