View Source Geometry.MultiLineStringZM (Geometry v0.4.0)
A set of line-strings from type Geometry.LineStringZM
MultiLineStringMZ implements the protocols Enumerable and Collectable.
examples
Examples
iex> Enum.map(
...> MultiLineStringZM.new([
...> LineStringZM.new([
...> PointZM.new(1, 2, 3, 4),
...> PointZM.new(3, 4, 5, 6)
...> ]),
...> LineStringZM.new([
...> PointZM.new(1, 2, 3, 4),
...> PointZM.new(11, 12, 13, 14),
...> PointZM.new(13, 14, 15, 16)
...> ])
...> ]),
...> fn line_string -> length line_string end
...> )
[2, 3]
iex> Enum.into(
...> [LineStringZM.new([PointZM.new(1, 2, 3, 4), PointZM.new(5, 6, 7, 8)])],
...> MultiLineStringZM.new())
%MultiLineStringZM{line_strings: [[[1, 2, 3, 4], [5, 6, 7, 8]]]}
Link to this section Summary
Functions
Creates an empty MultiLineStringZM.
Creates a MultiLineStringZM from the given Geometry.MultiLineStringZMs.
Link to this section Types
@type t() :: %Geometry.MultiLineStringZM{line_strings: [Geometry.coordinates()]}
Link to this section Functions
@spec new() :: t()
Creates an empty MultiLineStringZM.
examples
Examples
iex> MultiLineStringZM.new()
%MultiLineStringZM{}
@spec new([Geometry.LineStringZM.t()]) :: t()
Creates a MultiLineStringZM from the given Geometry.MultiLineStringZMs.
examples
Examples
iex> MultiLineStringZM.new([
...> LineStringZM.new([
...> PointZM.new(1, 2, 3, 4),
...> PointZM.new(2, 3, 4, 5),
...> PointZM.new(3, 4, 5, 6)
...> ]),
...> LineStringZM.new([
...> PointZM.new(10, 20, 30, 40),
...> PointZM.new(30, 40, 50, 60)
...> ])
...> ])
%Geometry.MultiLineStringZM{
line_strings: [
[[1, 2, 3, 4], [2, 3, 4, 5], [3, 4, 5, 6]],
[[10, 20, 30, 40], [30, 40, 50, 60]]
]
}
iex> MultiLineStringZM.new([])
%MultiLineStringZM{}