Geometry.CurvePolygonZ (Geometry v1.2.0)

View Source

A curve-polygon struct, representing a 3D polygon with curved rings.

A CurvePolygon is like a polygon, with an outer ring and zero or more inner rings. The difference is that a ring can be a CircularString or CompoundCurve as well as a LineString.

Summary

Functions

Creates an empty CurvePolygonZ.

Creates a CurvePolygonZ from the given rings.

Types

ring()

t()

@type t() :: %Geometry.CurvePolygonZ{rings: [ring()], srid: Geometry.srid()}

Functions

new()

@spec new() :: t()

Creates an empty CurvePolygonZ.

Examples

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

new(rings, srid \\ 0)

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

Creates a CurvePolygonZ from the given rings.

Examples

iex> Geometry.CurvePolygonZ.new([
...>   Geometry.LineStringZ.new([
...>     Geometry.PointZ.new(0, 0, 1),
...>     Geometry.PointZ.new(10, 0, 2),
...>     Geometry.PointZ.new(10, 10, 3),
...>     Geometry.PointZ.new(0, 0, 1)
...>   ])
...> ])
%Geometry.CurvePolygonZ{
  rings: [
    %Geometry.LineStringZ{
      path: [[0, 0, 1], [10, 0, 2], [10, 10, 3], [0, 0, 1]],
      srid: 0
    }
  ],
  srid: 0
}