Geometry.PointZ (Geometry v1.1.1)
View SourceA 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
@type t() :: %Geometry.PointZ{ coordinates: Geometry.coordinates() | [], srid: Geometry.srid() }
Functions
@spec new() :: t()
Creates an empty PointZ
.
Examples
iex> PointZ.new()
%PointZ{coordinates: []}
@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]}
@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}