View Source Geometry.MultiPointZ (Geometry v0.4.0)
A set of points from type Geometry.PointZ.
MultiPointZ implements the protocols Enumerable and Collectable.
examples
Examples
iex> Enum.map(
...> MultiPointZ.new([
...> PointZ.new(1, 2, 3),
...> PointZ.new(3, 4, 5)
...> ]),
...> fn [x, _y, _z] -> x end
...> )
[1, 3]
iex> Enum.into([PointZ.new(1, 2, 3)], MultiPointZ.new())
%MultiPointZ{points: [[1, 2, 3]]}
Link to this section Summary
Link to this section Types
@type t() :: %Geometry.MultiPointZ{points: [Geometry.coordinate()]}
Link to this section Functions
@spec new() :: t()
Creates an empty MultiPointZ.
examples
Examples
iex> MultiPointZ.new()
%MultiPointZ{points: []}
@spec new([Geometry.PointZ.t()]) :: t()
Creates a MultiPointZ from the given Geometry.PointZs.
examples
Examples
iex> MultiPointZ.new([
...> PointZ.new(1, 2, 3),
...> PointZ.new(3, 4, 5)
...> ])
%MultiPointZ{points: [[1, 2, 3], [3, 4, 5]]}
iex> MultiPointZ.new([])
%MultiPointZ{points: []}