Documentation ¶
Overview ¶
Package pgeo implements geometric types for Postgres
Geometric types: https://www.postgresql.org/docs/current/static/datatype-geometric.html
Description: https://github.com/saulortega/pgeo
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Box ¶
type Box [2]Point
Box is represented by pairs of points that are opposite corners of the box.
type Circle ¶
Circle is represented by a center point and radius.
type Line ¶
Line represents a infinite line with the linear equation Ax + By + C = 0, where A and B are not both zero.
type Lseg ¶
type Lseg [2]Point
Lseg is a line segment and is represented by pairs of points that are the endpoints of the segment.
type NullCircle ¶
NullCircle allows circle to be null
func NewNullCircle ¶
func NewNullCircle(C Circle, v bool) NullCircle
NewNullCircle creates a circle which can be null
type NullLine ¶
NullLine allows line to be null
func NewNullLine ¶
NewNullLine creates a line which can be null
type NullLseg ¶
NullLseg allows line segment to be null
func NewNullLseg ¶
NewNullLseg creates a line segment which can be null
type NullPath ¶
NullPath allows path to be null
func NewNullPath ¶
NewNullPath creates a path which can be null
type NullPoint ¶
NullPoint allows point to be null
func NewNullPoint ¶
NewNullPoint creates a point which can be null
type NullPolygon ¶
NullPolygon allows polygon to be null
func NewNullPolygon ¶
func NewNullPolygon(P Polygon, v bool) NullPolygon
NewNullPolygon creates a polygon which can be null
type Path ¶
Path is represented by lists of connected points. Paths can be open, where the first and last points in the list are considered not connected, or closed, where the first and last points are considered connected.
type Point ¶
Point is the fundamental two-dimensional building block for geometric types. X and Y are the respective coordinates, as floating-point numbers