Geometry.MultiPointZM (Geometry v1.1.0)

View Source

A 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

Functions

Creates an empty MultiPointZM.

Creates a MultiPointZM from the given Geometry.PointZMs.

Types

t()

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

Functions

new()

@spec new() :: t()

Creates an empty MultiPointZM.

Examples

iex> MultiPointZM.new()
%MultiPointZM{}

new(points, srid \\ 0)

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

Creates a MultiPointZM from the given Geometry.PointZMs.

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