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