Geometry.MultiSurfaceM (Geometry v1.2.0)

View Source

A multi-surface struct, representing a 2D collection of surfaces with a measurement.

A MultiSurface is a collection of surfaces which can include Polygons or CurvePolygons.

Summary

Functions

Creates an empty MultiSurfaceM.

Creates a MultiSurfaceM from the given surfaces.

Types

surface()

t()

@type t() :: %Geometry.MultiSurfaceM{srid: Geometry.srid(), surfaces: [surface()]}

Functions

new()

@spec new() :: t()

Creates an empty MultiSurfaceM.

Examples

iex> Geometry.MultiSurfaceM.new()
%Geometry.MultiSurfaceM{surfaces: [], srid: 0}

new(surfaces, srid \\ 0)

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

Creates a MultiSurfaceM from the given surfaces.

Examples

iex> Geometry.MultiSurfaceM.new([
...>   Geometry.PolygonM.new([
...>     Geometry.LineStringM.new([
...>       Geometry.PointM.new(0, 0, 1), Geometry.PointM.new(4, 0, 2),
...>       Geometry.PointM.new(4, 4, 3), Geometry.PointM.new(0, 4, 4),
...>       Geometry.PointM.new(0, 0, 5)
...>     ])
...>   ])
...> ])
%Geometry.MultiSurfaceM{
  surfaces: [
    %Geometry.PolygonM{rings: [[[0, 0, 1], [4, 0, 2], [4, 4, 3], [0, 4, 4], [0, 0, 5]]], srid: 0}
  ],
  srid: 0
}