Point2d

Represents a single location in 2-dimensional space.

Contains SRID along with its x and y coordinates.

Constructors

this
this(Point2d other)

Create a shallow copy of other point 2d.

this
this(Value value)

Create a point 2d from a Value.

this
this(mg_point_2d* ptr)

Create a Point2d using the given mg_point_2d pointer.

Members

Functions

opEquals
auto opEquals(Point2d other)

Compares this point 2d with other. Return: true if same, false otherwise.

ptr
auto ptr()

Return pointer to internal mg_point_2d.

srid
auto srid()

Returns SRID of the 2D point.

toHash
size_t toHash()

Return the hash code for this point 2d.

toString
string toString()

Return a printable string representation of this time.

x
auto x()

Returns the x coordinate of the 2D point.

y
auto y()

Returns the y coordinate of the 2D point.

Meta