Geometry.PointZ (Geometry v1.1.1)

View Source

A point struct, representing a 3D point.

Summary

Functions

Creates an empty PointZ.

Creates a PointZ from the given coordinate.

Creates a PointZ from the given x, y, and z.

Types

t()

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

Functions

new()

@spec new() :: t()

Creates an empty PointZ.

Examples

iex> PointZ.new()
%PointZ{coordinates: []}

new(coordinate, srid \\ 0)

@spec new(Geometry.coordinates(), Geometry.srid()) :: t()

Creates a PointZ from the given coordinate.

Examples

iex> PointZ.new([1.5, -2.1, 3])
%PointZ{coordinates: [1.5, -2.1, 3]}

new(x, y, z, srid \\ 0)

@spec new(number(), number(), number(), Geometry.srid()) :: t()

Creates a PointZ from the given x, y, and z.

Examples

iex> PointZ.new(-1.1, 2.2, 3)
%PointZ{coordinates: [-1.1, 2.2, 3], srid: 0}