Geometry.PointM (Geometry v1.1.0)

View Source

A 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

t()

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

Functions

new()

@spec new() :: t()

Creates an empty PointM.

Examples

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

new(coordinate, srid \\ 0)

@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]}

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

@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}