Geometry.PointM (Geometry v1.1.0)
View SourceA point struct, representing a 2D point with a measurement.
Summary
Functions
Creates an empty PointM
.
Creates a PointM
from the given coordinate
.
Creates a PointM
from the given x
, y
, and m
.
Types
@type t() :: %Geometry.PointM{ coordinates: Geometry.coordinates() | [], srid: Geometry.srid() }
Functions
@spec new() :: t()
Creates an empty PointM
.
Examples
iex> PointM.new()
%PointM{coordinates: []}
@spec new(Geometry.coordinates(), Geometry.srid()) :: t()
Creates a PointM
from the given coordinate
.
Examples
iex> PointM.new([1.5, -2.1, 4])
%PointM{coordinates: [1.5, -2.1, 4]}
@spec new(number(), number(), number(), Geometry.srid()) :: t()
Creates a PointM
from the given x
, y
, and m
.
Examples
iex> PointM.new(-1.1, 2.2, 4)
%PointM{coordinates: [-1.1, 2.2, 4], srid: 0}