Geometry.MultiPointZ (Geometry v1.1.0)

View Source

A set of coordinates from type Geometry.PointZ.

MultiPointZ implements the protocols Enumerable and Collectable.

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]]}

Summary

Functions

Creates an empty MultiPointZ.

Creates a MultiPointZ from the given Geometry.PointZs.

Types

t()

@type t() :: %Geometry.MultiPointZ{
  points: [Geometry.coordinates()],
  srid: Geometry.srid()
}

Functions

new()

@spec new() :: t()

Creates an empty MultiPointZ.

Examples

iex> MultiPointZ.new()
%MultiPointZ{points: [], srid: 0}

new(points, srid \\ 0)

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

Creates a MultiPointZ from the given Geometry.PointZs.

Examples

iex> MultiPointZ.new([
...>   PointZ.new(1, 2, 3),
...>   PointZ.new(3, 4, 5)
...> ])
%MultiPointZ{points: [[1, 2, 3], [3, 4, 5]], srid: 0}

iex> MultiPointZ.new([])
%MultiPointZ{points: [], srid: 0}