Documentation ¶
Index ¶
- Variables
- func EvalGeomFromWKB(ctx *sql.Context, row sql.Row, exprs []sql.Expression, expectedGeomType int) (interface{}, error)
- func FindBBox(v interface{}) [4]float64
- func FindDimension(g types.GeometryValue) interface{}
- func GeomCollToSlice(g types.GeomColl) interface{}
- func GeomCollToWKT(g types.GeomColl, order bool) string
- func LineToSlice(l types.LineString) [][2]float64
- func LineToWKT(l types.LineString, order bool) string
- func MLineToSlice(p types.MultiLineString) [][][2]float64
- func MPointToSlice(p types.MultiPoint) [][2]float64
- func MPolyToSlice(p types.MultiPolygon) [][][][2]float64
- func MultiLineStringToWKT(l types.MultiLineString, order bool) string
- func MultiPointToWKT(p types.MultiPoint, order bool) string
- func MultiPolygonToWKT(p types.MultiPolygon, order bool) string
- func NewArea(arg sql.Expression) sql.Expression
- func NewAsGeoJSON(args ...sql.Expression) (sql.Expression, error)
- func NewAsWKB(e sql.Expression) sql.Expression
- func NewAsWKT(e sql.Expression) sql.Expression
- func NewDimension(e sql.Expression) sql.Expression
- func NewDistance(args ...sql.Expression) (sql.Expression, error)
- func NewEndPoint(arg sql.Expression) sql.Expression
- func NewGeomColl(args ...sql.Expression) (sql.Expression, error)
- func NewGeomCollFromText(args ...sql.Expression) (sql.Expression, error)
- func NewGeomCollFromWKB(args ...sql.Expression) (sql.Expression, error)
- func NewGeomFromGeoJSON(args ...sql.Expression) (sql.Expression, error)
- func NewGeomFromText(args ...sql.Expression) (sql.Expression, error)
- func NewGeomFromWKB(args ...sql.Expression) (sql.Expression, error)
- func NewIntersects(g1, g2 sql.Expression) sql.Expression
- func NewIsClosed(arg sql.Expression) sql.Expression
- func NewLatitude(args ...sql.Expression) (sql.Expression, error)
- func NewLineFromText(args ...sql.Expression) (sql.Expression, error)
- func NewLineFromWKB(args ...sql.Expression) (sql.Expression, error)
- func NewLineString(args ...sql.Expression) (sql.Expression, error)
- func NewLongitude(args ...sql.Expression) (sql.Expression, error)
- func NewMLineFromText(args ...sql.Expression) (sql.Expression, error)
- func NewMLineFromWKB(args ...sql.Expression) (sql.Expression, error)
- func NewMPointFromText(args ...sql.Expression) (sql.Expression, error)
- func NewMPointFromWKB(args ...sql.Expression) (sql.Expression, error)
- func NewMPolyFromText(args ...sql.Expression) (sql.Expression, error)
- func NewMPolyFromWKB(args ...sql.Expression) (sql.Expression, error)
- func NewMultiLineString(args ...sql.Expression) (sql.Expression, error)
- func NewMultiPoint(args ...sql.Expression) (sql.Expression, error)
- func NewMultiPolygon(args ...sql.Expression) (sql.Expression, error)
- func NewPerimeter(args ...sql.Expression) (sql.Expression, error)
- func NewPoint(e1, e2 sql.Expression) sql.Expression
- func NewPointFromText(args ...sql.Expression) (sql.Expression, error)
- func NewPointFromWKB(args ...sql.Expression) (sql.Expression, error)
- func NewPolyFromText(args ...sql.Expression) (sql.Expression, error)
- func NewPolyFromWKB(args ...sql.Expression) (sql.Expression, error)
- func NewPolygon(args ...sql.Expression) (sql.Expression, error)
- func NewSRID(args ...sql.Expression) (sql.Expression, error)
- func NewSTLength(args ...sql.Expression) (sql.Expression, error)
- func NewSTX(args ...sql.Expression) (sql.Expression, error)
- func NewSTY(args ...sql.Expression) (sql.Expression, error)
- func NewStartPoint(arg sql.Expression) sql.Expression
- func NewSwapXY(e sql.Expression) sql.Expression
- func NewWithin(g1, g2 sql.Expression) sql.Expression
- func ParseAxisOrder(s string) (bool, error)
- func ParseGeoJsonData(obj map[string]interface{}) (interface{}, string, error)
- func ParseWKTHeader(s string) (string, string, int, error)
- func PointToSlice(p types.Point) [2]float64
- func PointToWKT(p types.Point, order bool) string
- func PolyToSlice(p types.Polygon) [][][2]float64
- func PolygonToWKT(p types.Polygon, order bool) string
- func RoundFloatSlices(v interface{}, p float64) interface{}
- func SliceToGeomColl(geometries interface{}) (interface{}, error)
- func SliceToLine(coords interface{}) (interface{}, error)
- func SliceToMLine(coords interface{}) (interface{}, error)
- func SliceToMPoint(coords interface{}) (interface{}, error)
- func SliceToMPoly(coords interface{}) (interface{}, error)
- func SliceToPoint(coords interface{}) (interface{}, error)
- func SliceToPoly(coords interface{}) (interface{}, error)
- func TrimWKTData(s string) (string, int, error)
- func ValidateSRID(srid uint32) error
- func WKTToGeom(ctx *sql.Context, row sql.Row, exprs []sql.Expression, expectedGeomType string) (types.GeometryValue, error)
- func WKTToGeomColl(s string, srid uint32, order bool) (types.GeomColl, error)
- func WKTToLine(s string, srid uint32, order bool) (types.LineString, error)
- func WKTToMLine(s string, srid uint32, order bool) (types.MultiLineString, error)
- func WKTToMPoint(s string, srid uint32, order bool) (types.MultiPoint, error)
- func WKTToMPoly(s string, srid uint32, order bool) (types.MultiPolygon, error)
- func WKTToPoint(s string, srid uint32, order bool) (types.Point, error)
- func WKTToPoly(s string, srid uint32, order bool) (types.Polygon, error)
- type Area
- type AsGeoJSON
- func (g *AsGeoJSON) Description() string
- func (g *AsGeoJSON) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (g *AsGeoJSON) FunctionName() string
- func (g *AsGeoJSON) String() string
- func (g *AsGeoJSON) Type() sql.Type
- func (g *AsGeoJSON) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type AsWKB
- func (a *AsWKB) Description() string
- func (a *AsWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (a *AsWKB) FunctionName() string
- func (a *AsWKB) IsNullable() bool
- func (a *AsWKB) String() string
- func (a *AsWKB) Type() sql.Type
- func (a *AsWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type AsWKT
- func (p *AsWKT) Description() string
- func (p *AsWKT) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (p *AsWKT) FunctionName() string
- func (p *AsWKT) IsNullable() bool
- func (p *AsWKT) String() string
- func (p *AsWKT) Type() sql.Type
- func (p *AsWKT) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type Dimension
- func (p *Dimension) Description() string
- func (p *Dimension) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (p *Dimension) FunctionName() string
- func (p *Dimension) IsNullable() bool
- func (p *Dimension) String() string
- func (p *Dimension) Type() sql.Type
- func (p *Dimension) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type Distance
- func (d *Distance) Description() string
- func (d *Distance) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (d *Distance) FunctionName() string
- func (d *Distance) String() string
- func (d *Distance) Type() sql.Type
- func (d *Distance) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type EndPoint
- func (e *EndPoint) Description() string
- func (e *EndPoint) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (e *EndPoint) FunctionName() string
- func (e *EndPoint) String() string
- func (e *EndPoint) Type() sql.Type
- func (e *EndPoint) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type GeomColl
- func (g *GeomColl) Description() string
- func (g *GeomColl) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (g *GeomColl) FunctionName() string
- func (g *GeomColl) String() string
- func (g *GeomColl) Type() sql.Type
- func (g *GeomColl) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type GeomCollFromText
- func (p *GeomCollFromText) Description() string
- func (p *GeomCollFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (p *GeomCollFromText) FunctionName() string
- func (p *GeomCollFromText) String() string
- func (p *GeomCollFromText) Type() sql.Type
- func (p *GeomCollFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type GeomCollFromWKB
- func (g *GeomCollFromWKB) Description() string
- func (g *GeomCollFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (g *GeomCollFromWKB) FunctionName() string
- func (g *GeomCollFromWKB) String() string
- func (g *GeomCollFromWKB) Type() sql.Type
- func (g *GeomCollFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type GeomFromGeoJSON
- func (g *GeomFromGeoJSON) Description() string
- func (g *GeomFromGeoJSON) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (g *GeomFromGeoJSON) FunctionName() string
- func (g *GeomFromGeoJSON) String() string
- func (g *GeomFromGeoJSON) Type() sql.Type
- func (g *GeomFromGeoJSON) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type GeomFromText
- func (g *GeomFromText) Description() string
- func (g *GeomFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (g *GeomFromText) FunctionName() string
- func (g *GeomFromText) String() string
- func (g *GeomFromText) Type() sql.Type
- func (g *GeomFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type GeomFromWKB
- func (g *GeomFromWKB) Description() string
- func (g *GeomFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (g *GeomFromWKB) FunctionName() string
- func (g *GeomFromWKB) String() string
- func (g *GeomFromWKB) Type() sql.Type
- func (g *GeomFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type Intersects
- func (i *Intersects) Description() string
- func (i *Intersects) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (i *Intersects) FunctionName() string
- func (i *Intersects) String() string
- func (i *Intersects) Type() sql.Type
- func (i *Intersects) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type IsClosed
- func (i *IsClosed) Description() string
- func (i *IsClosed) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (i *IsClosed) FunctionName() string
- func (i *IsClosed) String() string
- func (i *IsClosed) Type() sql.Type
- func (i *IsClosed) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type Latitude
- func (l *Latitude) Description() string
- func (l *Latitude) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (l *Latitude) FunctionName() string
- func (l *Latitude) String() string
- func (l *Latitude) Type() sql.Type
- func (l *Latitude) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type LineFromText
- func (l *LineFromText) Description() string
- func (l *LineFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (l *LineFromText) FunctionName() string
- func (l *LineFromText) String() string
- func (l *LineFromText) Type() sql.Type
- func (l *LineFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type LineFromWKB
- func (l *LineFromWKB) Description() string
- func (l *LineFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (l *LineFromWKB) FunctionName() string
- func (l *LineFromWKB) String() string
- func (l *LineFromWKB) Type() sql.Type
- func (l *LineFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type LineString
- func (l *LineString) Description() string
- func (l *LineString) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (l *LineString) FunctionName() string
- func (l *LineString) String() string
- func (l *LineString) Type() sql.Type
- func (l *LineString) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type Longitude
- func (l *Longitude) Description() string
- func (l *Longitude) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (l *Longitude) FunctionName() string
- func (l *Longitude) String() string
- func (l *Longitude) Type() sql.Type
- func (l *Longitude) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type MLineFromText
- func (l *MLineFromText) Description() string
- func (l *MLineFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (l *MLineFromText) FunctionName() string
- func (l *MLineFromText) String() string
- func (l *MLineFromText) Type() sql.Type
- func (l *MLineFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type MLineFromWKB
- func (l *MLineFromWKB) Description() string
- func (l *MLineFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (l *MLineFromWKB) FunctionName() string
- func (l *MLineFromWKB) String() string
- func (l *MLineFromWKB) Type() sql.Type
- func (l *MLineFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type MPointFromText
- func (p *MPointFromText) Description() string
- func (p *MPointFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (p *MPointFromText) FunctionName() string
- func (p *MPointFromText) String() string
- func (p *MPointFromText) Type() sql.Type
- func (p *MPointFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type MPointFromWKB
- func (p *MPointFromWKB) Description() string
- func (p *MPointFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (p *MPointFromWKB) FunctionName() string
- func (p *MPointFromWKB) String() string
- func (p *MPointFromWKB) Type() sql.Type
- func (p *MPointFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type MPolyFromText
- func (p *MPolyFromText) Description() string
- func (p *MPolyFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (p *MPolyFromText) FunctionName() string
- func (p *MPolyFromText) String() string
- func (p *MPolyFromText) Type() sql.Type
- func (p *MPolyFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type MPolyFromWKB
- func (p *MPolyFromWKB) Description() string
- func (p *MPolyFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (p *MPolyFromWKB) FunctionName() string
- func (p *MPolyFromWKB) String() string
- func (p *MPolyFromWKB) Type() sql.Type
- func (p *MPolyFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type MultiLineString
- func (p *MultiLineString) Description() string
- func (p *MultiLineString) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (p *MultiLineString) FunctionName() string
- func (p *MultiLineString) String() string
- func (p *MultiLineString) Type() sql.Type
- func (p *MultiLineString) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type MultiPoint
- func (l *MultiPoint) Description() string
- func (l *MultiPoint) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (l *MultiPoint) FunctionName() string
- func (l *MultiPoint) String() string
- func (l *MultiPoint) Type() sql.Type
- func (l *MultiPoint) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type MultiPolygon
- func (p *MultiPolygon) Description() string
- func (p *MultiPolygon) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (p *MultiPolygon) FunctionName() string
- func (p *MultiPolygon) String() string
- func (p *MultiPolygon) Type() sql.Type
- func (p *MultiPolygon) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type Perimeter
- func (p *Perimeter) Description() string
- func (p *Perimeter) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (p *Perimeter) FunctionName() string
- func (p *Perimeter) String() string
- func (p *Perimeter) Type() sql.Type
- func (p *Perimeter) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type Point
- func (p *Point) Children() []sql.Expression
- func (p *Point) Description() string
- func (p *Point) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (p *Point) FunctionName() string
- func (p *Point) IsNullable() bool
- func (p *Point) Resolved() bool
- func (p *Point) String() string
- func (p *Point) Type() sql.Type
- func (p *Point) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type PointFromText
- func (p *PointFromText) Description() string
- func (p *PointFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (p *PointFromText) FunctionName() string
- func (p *PointFromText) String() string
- func (p *PointFromText) Type() sql.Type
- func (p *PointFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type PointFromWKB
- func (p *PointFromWKB) Description() string
- func (p *PointFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (p *PointFromWKB) FunctionName() string
- func (p *PointFromWKB) String() string
- func (p *PointFromWKB) Type() sql.Type
- func (p *PointFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type PolyFromText
- func (p *PolyFromText) Description() string
- func (p *PolyFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (p *PolyFromText) FunctionName() string
- func (p *PolyFromText) String() string
- func (p *PolyFromText) Type() sql.Type
- func (p *PolyFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type PolyFromWKB
- func (p *PolyFromWKB) Description() string
- func (p *PolyFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (p *PolyFromWKB) FunctionName() string
- func (p *PolyFromWKB) String() string
- func (p *PolyFromWKB) Type() sql.Type
- func (p *PolyFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type Polygon
- func (p *Polygon) Description() string
- func (p *Polygon) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (p *Polygon) FunctionName() string
- func (p *Polygon) String() string
- func (p *Polygon) Type() sql.Type
- func (p *Polygon) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type SRID
- type STLength
- func (s *STLength) Description() string
- func (s *STLength) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (s *STLength) FunctionName() string
- func (s *STLength) String() string
- func (s *STLength) Type() sql.Type
- func (s *STLength) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type STX
- type STY
- type SpatialRef
- type StartPoint
- func (s *StartPoint) Description() string
- func (s *StartPoint) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (s *StartPoint) FunctionName() string
- func (s *StartPoint) String() string
- func (s *StartPoint) Type() sql.Type
- func (s *StartPoint) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type SwapXY
- func (s *SwapXY) Description() string
- func (s *SwapXY) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (s *SwapXY) FunctionName() string
- func (s *SwapXY) IsNullable() bool
- func (s *SwapXY) String() string
- func (s *SwapXY) Type() sql.Type
- func (s *SwapXY) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type Within
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidSRID = errors.NewKind("There's no spatial reference with SRID %d")
var ErrInvalidType = errors.NewKind("%s received non-point type")
var ErrLatitudeOutOfRange = errors.NewKind("latitude %v is out of range in function %s. it must be within [-90.0, 90.0]")
var ErrLongitudeOutOfRange = errors.NewKind("longitude %v is out of range in function %s. it must be within [-180.0, 180.0]")
var ErrNoUnits = errors.NewKind("the geometry passed to function st_distance is in SRID %v, which doesn't specify a length unit. Can't convert to '%v'.")
ErrNoUnits is thrown when the specified SRID does not have units
var ErrNonGeographic = errors.NewKind("function %s is only defined for geographic spatial reference systems, but one of its argument is in SRID %v, which is not geographic")
var SupportedSRIDs = map[uint32]SpatialRef{ types.CartesianSRID: {"", types.CartesianSRID, nil, nil, "", nil}, types.GeoSpatialSRID: {"WGS 84", types.GeoSpatialSRID, "EPSG", types.GeoSpatialSRID, "GEOGCS[\"WGS 84\",DATUM[\"World Geodetic System 1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943278,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat\",NORTH],AXIS[\"Lon\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]", nil}, }
Functions ¶
func EvalGeomFromWKB ¶
func EvalGeomFromWKB(ctx *sql.Context, row sql.Row, exprs []sql.Expression, expectedGeomType int) (interface{}, error)
EvalGeomFromWKB takes in arguments for the ST_FROMWKB functions, and parses them to their corresponding geometry type
func FindDimension ¶
func FindDimension(g types.GeometryValue) interface{}
func GeomCollToSlice ¶
func GeomCollToWKT ¶
GeomCollToWKT converts a sql.Polygon to a string
func LineToSlice ¶
func LineToSlice(l types.LineString) [][2]float64
func LineToWKT ¶
func LineToWKT(l types.LineString, order bool) string
LineToWKT converts a sql.LineString to a string
func MLineToSlice ¶
func MLineToSlice(p types.MultiLineString) [][][2]float64
func MPointToSlice ¶
func MPointToSlice(p types.MultiPoint) [][2]float64
func MPolyToSlice ¶
func MPolyToSlice(p types.MultiPolygon) [][][][2]float64
func MultiLineStringToWKT ¶
func MultiLineStringToWKT(l types.MultiLineString, order bool) string
MultiLineStringToWKT converts a sql.Polygon to a string
func MultiPointToWKT ¶
func MultiPointToWKT(p types.MultiPoint, order bool) string
MultiPointToWKT converts a sql.MultiPoint to a string
func MultiPolygonToWKT ¶
func MultiPolygonToWKT(p types.MultiPolygon, order bool) string
MultiPolygonToWKT converts a sql.Polygon to a string
func NewArea ¶
func NewArea(arg sql.Expression) sql.Expression
NewArea creates a new Area expression.
func NewAsGeoJSON ¶
func NewAsGeoJSON(args ...sql.Expression) (sql.Expression, error)
NewAsGeoJSON creates a new point expression.
func NewAsWKB ¶
func NewAsWKB(e sql.Expression) sql.Expression
NewAsWKB creates a new point expression.
func NewAsWKT ¶
func NewAsWKT(e sql.Expression) sql.Expression
NewAsWKT creates a new point expression.
func NewDimension ¶
func NewDimension(e sql.Expression) sql.Expression
NewDimension creates a new point expression.
func NewDistance ¶
func NewDistance(args ...sql.Expression) (sql.Expression, error)
NewDistance creates a new Distance expression.
func NewEndPoint ¶
func NewEndPoint(arg sql.Expression) sql.Expression
NewEndPoint creates a new EndPoint expression.
func NewGeomColl ¶
func NewGeomColl(args ...sql.Expression) (sql.Expression, error)
NewGeomColl creates a new geometrycollection expression.
func NewGeomCollFromText ¶
func NewGeomCollFromText(args ...sql.Expression) (sql.Expression, error)
NewGeomCollFromText creates a new multilinestring expression.
func NewGeomCollFromWKB ¶
func NewGeomCollFromWKB(args ...sql.Expression) (sql.Expression, error)
NewGeomCollFromWKB creates a new geometrycollection expression.
func NewGeomFromGeoJSON ¶
func NewGeomFromGeoJSON(args ...sql.Expression) (sql.Expression, error)
NewGeomFromGeoJSON creates a new point expression.
func NewGeomFromText ¶
func NewGeomFromText(args ...sql.Expression) (sql.Expression, error)
NewGeomFromText creates a new point expression.
func NewGeomFromWKB ¶
func NewGeomFromWKB(args ...sql.Expression) (sql.Expression, error)
NewGeomFromWKB creates a new geometry expression.
func NewIntersects ¶
func NewIntersects(g1, g2 sql.Expression) sql.Expression
NewIntersects creates a new Intersects expression.
func NewIsClosed ¶
func NewIsClosed(arg sql.Expression) sql.Expression
NewIsClosed creates a new EndPoint expression.
func NewLatitude ¶
func NewLatitude(args ...sql.Expression) (sql.Expression, error)
NewLatitude creates a new ST_LATITUDE expression.
func NewLineFromText ¶
func NewLineFromText(args ...sql.Expression) (sql.Expression, error)
NewLineFromText creates a new point expression.
func NewLineFromWKB ¶
func NewLineFromWKB(args ...sql.Expression) (sql.Expression, error)
NewLineFromWKB creates a new point expression.
func NewLineString ¶
func NewLineString(args ...sql.Expression) (sql.Expression, error)
NewLineString creates a new LineString.
func NewLongitude ¶
func NewLongitude(args ...sql.Expression) (sql.Expression, error)
NewLongitude creates a new ST_LONGITUDE expression.
func NewMLineFromText ¶
func NewMLineFromText(args ...sql.Expression) (sql.Expression, error)
NewMLineFromText creates a new multilinestring expression.
func NewMLineFromWKB ¶
func NewMLineFromWKB(args ...sql.Expression) (sql.Expression, error)
NewMLineFromWKB creates a new point expression.
func NewMPointFromText ¶
func NewMPointFromText(args ...sql.Expression) (sql.Expression, error)
NewMPointFromText creates a new MultiPoint expression.
func NewMPointFromWKB ¶
func NewMPointFromWKB(args ...sql.Expression) (sql.Expression, error)
NewMPointFromWKB creates a new point expression.
func NewMPolyFromText ¶
func NewMPolyFromText(args ...sql.Expression) (sql.Expression, error)
NewMPolyFromText creates a new multilinestring expression.
func NewMPolyFromWKB ¶
func NewMPolyFromWKB(args ...sql.Expression) (sql.Expression, error)
NewMPolyFromWKB creates a new multipolygon expression.
func NewMultiLineString ¶
func NewMultiLineString(args ...sql.Expression) (sql.Expression, error)
NewMultiLineString creates a new multilinestring expression.
func NewMultiPoint ¶
func NewMultiPoint(args ...sql.Expression) (sql.Expression, error)
NewMultiPoint creates a new MultiPoint.
func NewMultiPolygon ¶
func NewMultiPolygon(args ...sql.Expression) (sql.Expression, error)
NewMultiPolygon creates a new multipolygon expression.
func NewPerimeter ¶
func NewPerimeter(args ...sql.Expression) (sql.Expression, error)
NewSTLength creates a new STX expression.
func NewPoint ¶
func NewPoint(e1, e2 sql.Expression) sql.Expression
NewPoint creates a new point expression.
func NewPointFromText ¶
func NewPointFromText(args ...sql.Expression) (sql.Expression, error)
NewPointFromText creates a new point expression.
func NewPointFromWKB ¶
func NewPointFromWKB(args ...sql.Expression) (sql.Expression, error)
NewPointFromWKB creates a new point expression.
func NewPolyFromText ¶
func NewPolyFromText(args ...sql.Expression) (sql.Expression, error)
NewPolyFromText creates a new polygon expression.
func NewPolyFromWKB ¶
func NewPolyFromWKB(args ...sql.Expression) (sql.Expression, error)
NewPolyFromWKB creates a new point expression.
func NewPolygon ¶
func NewPolygon(args ...sql.Expression) (sql.Expression, error)
NewPolygon creates a new polygon expression.
func NewSRID ¶
func NewSRID(args ...sql.Expression) (sql.Expression, error)
NewSRID creates a new STX expression.
func NewSTLength ¶
func NewSTLength(args ...sql.Expression) (sql.Expression, error)
NewSTLength creates a new STLength expression.
func NewSTX ¶
func NewSTX(args ...sql.Expression) (sql.Expression, error)
NewSTX creates a new STX expression.
func NewSTY ¶
func NewSTY(args ...sql.Expression) (sql.Expression, error)
NewSTY creates a new STY expression.
func NewStartPoint ¶
func NewStartPoint(arg sql.Expression) sql.Expression
NewStartPoint creates a new StartPoint expression.
func NewSwapXY ¶
func NewSwapXY(e sql.Expression) sql.Expression
NewSwapXY creates a new point expression.
func NewWithin ¶
func NewWithin(g1, g2 sql.Expression) sql.Expression
NewWithin creates a new Within expression.
func ParseAxisOrder ¶
ParseAxisOrder takes in a key, value string and determines the order of the xy coords
func ParseGeoJsonData ¶
func ParseWKTHeader ¶
ParseWKTHeader should extract the type and data from the geometry string `end` is used to detect extra characters after a valid geometry
func PointToSlice ¶
func PointToWKT ¶
PointToWKT converts a sql.Point to a string
func PolyToSlice ¶
func PolygonToWKT ¶
PolygonToWKT converts a sql.Polygon to a string
func RoundFloatSlices ¶
func RoundFloatSlices(v interface{}, p float64) interface{}
func SliceToGeomColl ¶
func SliceToGeomColl(geometries interface{}) (interface{}, error)
func SliceToLine ¶
func SliceToLine(coords interface{}) (interface{}, error)
func SliceToMLine ¶
func SliceToMLine(coords interface{}) (interface{}, error)
func SliceToMPoint ¶
func SliceToMPoint(coords interface{}) (interface{}, error)
func SliceToMPoly ¶
func SliceToMPoly(coords interface{}) (interface{}, error)
func SliceToPoint ¶
func SliceToPoint(coords interface{}) (interface{}, error)
func SliceToPoly ¶
func SliceToPoly(coords interface{}) (interface{}, error)
func ValidateSRID ¶
func WKTToGeom ¶
func WKTToGeom(ctx *sql.Context, row sql.Row, exprs []sql.Expression, expectedGeomType string) (types.GeometryValue, error)
WKTToGeom expects a string in WKT format, and converts it to a geometry type
func WKTToGeomColl ¶
WKTToGeomColl Expects a string like "((1 2, 3 4), (5 6, 7 8), ...), ..."
func WKTToMLine ¶
WKTToMLine Expects a string like "(1 2, 3 4), (5 6, 7 8), ..."
func WKTToMPoint ¶
WKTToMPoint expects a string like "1.2 3.4, 5.6 7.8, ..."
func WKTToMPoly ¶
WKTToMPoly Expects a string like "((1 2, 3 4), (5 6, 7 8), ...), ..."
func WKTToPoint ¶
WKTToPoint expects a string like this "1.2 3.4"
Types ¶
type Area ¶
type Area struct {
expression.UnaryExpression
}
Area is a function that returns the Area of a Polygon
func (*Area) Description ¶
Description implements sql.FunctionExpression
func (*Area) FunctionName ¶
FunctionName implements sql.FunctionExpression
func (*Area) WithChildren ¶
func (a *Area) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type AsGeoJSON ¶
type AsGeoJSON struct {
expression.NaryExpression
}
AsGeoJSON is a function that returns a point type from a WKT string
func (*AsGeoJSON) Description ¶
Description implements sql.FunctionExpression
func (*AsGeoJSON) FunctionName ¶
FunctionName implements sql.FunctionExpression
func (*AsGeoJSON) WithChildren ¶
func (g *AsGeoJSON) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type AsWKB ¶
type AsWKB struct {
expression.UnaryExpression
}
AsWKB is a function that converts a spatial type into WKB format (alias for AsBinary)
func (*AsWKB) Description ¶
Description implements sql.FunctionExpression
func (*AsWKB) FunctionName ¶
FunctionName implements sql.FunctionExpression
func (*AsWKB) IsNullable ¶
IsNullable implements the sql.Expression interface.
func (*AsWKB) WithChildren ¶
func (a *AsWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type AsWKT ¶
type AsWKT struct {
expression.UnaryExpression
}
AsWKT is a function that converts a spatial type into WKT format (alias for AsText)
func (*AsWKT) Description ¶
Description implements sql.FunctionExpression
func (*AsWKT) FunctionName ¶
FunctionName implements sql.FunctionExpression
func (*AsWKT) IsNullable ¶
IsNullable implements the sql.Expression interface.
func (*AsWKT) WithChildren ¶
func (p *AsWKT) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type Dimension ¶
type Dimension struct {
expression.UnaryExpression
}
Dimension is a function that converts a spatial type into WKT format (alias for AsText)
func (*Dimension) Description ¶
Description implements sql.FunctionExpression
func (*Dimension) FunctionName ¶
FunctionName implements sql.FunctionExpression
func (*Dimension) IsNullable ¶
IsNullable implements the sql.Expression interface.
func (*Dimension) WithChildren ¶
func (p *Dimension) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type Distance ¶
type Distance struct {
expression.NaryExpression
}
Distance is a function that returns the shortest distance between two geometries
func (*Distance) Description ¶
Description implements sql.FunctionExpression
func (*Distance) FunctionName ¶
FunctionName implements sql.FunctionExpression
func (*Distance) WithChildren ¶
func (d *Distance) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type EndPoint ¶
type EndPoint struct {
expression.UnaryExpression
}
EndPoint is a function that returns the last point of a LineString
func (*EndPoint) Description ¶
Description implements sql.FunctionExpression
func (*EndPoint) FunctionName ¶
FunctionName implements sql.FunctionExpression
func (*EndPoint) WithChildren ¶
func (e *EndPoint) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type GeomColl ¶
type GeomColl struct {
expression.NaryExpression
}
GeomColl is a function that returns a GeometryCollection.
func (*GeomColl) Description ¶
Description implements sql.FunctionExpression
func (*GeomColl) FunctionName ¶
FunctionName implements sql.FunctionExpression
func (*GeomColl) WithChildren ¶
func (g *GeomColl) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type GeomCollFromText ¶
type GeomCollFromText struct {
expression.NaryExpression
}
GeomCollFromText is a function that returns a MultiPolygon type from a WKT string
func (*GeomCollFromText) Description ¶
func (p *GeomCollFromText) Description() string
Description implements sql.FunctionExpression
func (*GeomCollFromText) FunctionName ¶
func (p *GeomCollFromText) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*GeomCollFromText) String ¶
func (p *GeomCollFromText) String() string
func (*GeomCollFromText) Type ¶
func (p *GeomCollFromText) Type() sql.Type
Type implements the sql.Expression interface.
func (*GeomCollFromText) WithChildren ¶
func (p *GeomCollFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type GeomCollFromWKB ¶
type GeomCollFromWKB struct {
expression.NaryExpression
}
GeomCollFromWKB is a function that returns a polygon type from a WKB byte array
func (*GeomCollFromWKB) Description ¶
func (g *GeomCollFromWKB) Description() string
Description implements sql.FunctionExpression
func (*GeomCollFromWKB) FunctionName ¶
func (g *GeomCollFromWKB) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*GeomCollFromWKB) String ¶
func (g *GeomCollFromWKB) String() string
func (*GeomCollFromWKB) Type ¶
func (g *GeomCollFromWKB) Type() sql.Type
Type implements the sql.Expression interface.
func (*GeomCollFromWKB) WithChildren ¶
func (g *GeomCollFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type GeomFromGeoJSON ¶
type GeomFromGeoJSON struct {
expression.NaryExpression
}
GeomFromGeoJSON is a function returns a geometry based on a string
func (*GeomFromGeoJSON) Description ¶
func (g *GeomFromGeoJSON) Description() string
Description implements sql.FunctionExpression
func (*GeomFromGeoJSON) FunctionName ¶
func (g *GeomFromGeoJSON) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*GeomFromGeoJSON) String ¶
func (g *GeomFromGeoJSON) String() string
func (*GeomFromGeoJSON) Type ¶
func (g *GeomFromGeoJSON) Type() sql.Type
Type implements the sql.Expression interface.
func (*GeomFromGeoJSON) WithChildren ¶
func (g *GeomFromGeoJSON) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type GeomFromText ¶
type GeomFromText struct {
expression.NaryExpression
}
GeomFromText is a function that returns a point type from a WKT string
func (*GeomFromText) Description ¶
func (g *GeomFromText) Description() string
Description implements sql.FunctionExpression
func (*GeomFromText) FunctionName ¶
func (g *GeomFromText) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*GeomFromText) String ¶
func (g *GeomFromText) String() string
func (*GeomFromText) Type ¶
func (g *GeomFromText) Type() sql.Type
Type implements the sql.Expression interface.
func (*GeomFromText) WithChildren ¶
func (g *GeomFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type GeomFromWKB ¶
type GeomFromWKB struct {
expression.NaryExpression
}
GeomFromWKB is a function that returns a geometry type from a WKB byte array
func (*GeomFromWKB) Description ¶
func (g *GeomFromWKB) Description() string
Description implements sql.FunctionExpression
func (*GeomFromWKB) FunctionName ¶
func (g *GeomFromWKB) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*GeomFromWKB) String ¶
func (g *GeomFromWKB) String() string
func (*GeomFromWKB) Type ¶
func (g *GeomFromWKB) Type() sql.Type
Type implements the sql.Expression interface.
func (*GeomFromWKB) WithChildren ¶
func (g *GeomFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type Intersects ¶
type Intersects struct {
expression.BinaryExpression
}
Intersects is a function that returns true if the two geometries intersect
func (*Intersects) Description ¶
func (i *Intersects) Description() string
Description implements sql.FunctionExpression
func (*Intersects) FunctionName ¶
func (i *Intersects) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*Intersects) String ¶
func (i *Intersects) String() string
func (*Intersects) Type ¶
func (i *Intersects) Type() sql.Type
Type implements the sql.Expression interface.
func (*Intersects) WithChildren ¶
func (i *Intersects) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type IsClosed ¶
type IsClosed struct {
expression.UnaryExpression
}
IsClosed is a function that checks if a LineString or MultiLineString is close
func (*IsClosed) Description ¶
Description implements sql.FunctionExpression
func (*IsClosed) FunctionName ¶
FunctionName implements sql.FunctionExpression
func (*IsClosed) WithChildren ¶
func (i *IsClosed) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type Latitude ¶
type Latitude struct {
expression.NaryExpression
}
Latitude is a function that returns the x value from a given point.
func (*Latitude) Description ¶
Description implements sql.FunctionExpression
func (*Latitude) FunctionName ¶
FunctionName implements sql.FunctionExpression
func (*Latitude) WithChildren ¶
func (l *Latitude) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type LineFromText ¶
type LineFromText struct {
expression.NaryExpression
}
LineFromText is a function that returns a LineString type from a WKT string
func (*LineFromText) Description ¶
func (l *LineFromText) Description() string
Description implements sql.FunctionExpression
func (*LineFromText) FunctionName ¶
func (l *LineFromText) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*LineFromText) String ¶
func (l *LineFromText) String() string
func (*LineFromText) Type ¶
func (l *LineFromText) Type() sql.Type
Type implements the sql.Expression interface.
func (*LineFromText) WithChildren ¶
func (l *LineFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type LineFromWKB ¶
type LineFromWKB struct {
expression.NaryExpression
}
LineFromWKB is a function that returns a linestring type from a WKB byte array
func (*LineFromWKB) Description ¶
func (l *LineFromWKB) Description() string
Description implements sql.FunctionExpression
func (*LineFromWKB) FunctionName ¶
func (l *LineFromWKB) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*LineFromWKB) String ¶
func (l *LineFromWKB) String() string
func (*LineFromWKB) Type ¶
func (l *LineFromWKB) Type() sql.Type
Type implements the sql.Expression interface.
func (*LineFromWKB) WithChildren ¶
func (l *LineFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type LineString ¶
type LineString struct {
expression.NaryExpression
}
LineString is a function that returns a point type containing values Y and Y.
func (*LineString) Description ¶
func (l *LineString) Description() string
Description implements sql.FunctionExpression
func (*LineString) FunctionName ¶
func (l *LineString) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*LineString) String ¶
func (l *LineString) String() string
func (*LineString) Type ¶
func (l *LineString) Type() sql.Type
Type implements the sql.Expression interface.
func (*LineString) WithChildren ¶
func (l *LineString) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type Longitude ¶
type Longitude struct {
expression.NaryExpression
}
Longitude is a function that returns the x value from a given point.
func (*Longitude) Description ¶
Description implements sql.FunctionExpression
func (*Longitude) FunctionName ¶
FunctionName implements sql.FunctionExpression
func (*Longitude) WithChildren ¶
func (l *Longitude) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type MLineFromText ¶
type MLineFromText struct {
expression.NaryExpression
}
MLineFromText is a function that returns a MultiLineString type from a WKT string
func (*MLineFromText) Description ¶
func (l *MLineFromText) Description() string
Description implements sql.FunctionExpression
func (*MLineFromText) FunctionName ¶
func (l *MLineFromText) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*MLineFromText) String ¶
func (l *MLineFromText) String() string
func (*MLineFromText) Type ¶
func (l *MLineFromText) Type() sql.Type
Type implements the sql.Expression interface.
func (*MLineFromText) WithChildren ¶
func (l *MLineFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type MLineFromWKB ¶
type MLineFromWKB struct {
expression.NaryExpression
}
MLineFromWKB is a function that returns a polygon type from a WKB byte array
func (*MLineFromWKB) Description ¶
func (l *MLineFromWKB) Description() string
Description implements sql.FunctionExpression
func (*MLineFromWKB) FunctionName ¶
func (l *MLineFromWKB) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*MLineFromWKB) String ¶
func (l *MLineFromWKB) String() string
func (*MLineFromWKB) Type ¶
func (l *MLineFromWKB) Type() sql.Type
Type implements the sql.Expression interface.
func (*MLineFromWKB) WithChildren ¶
func (l *MLineFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type MPointFromText ¶
type MPointFromText struct {
expression.NaryExpression
}
MultiPoint is a function that returns a MultiPoint type from a WKT string
func (*MPointFromText) Description ¶
func (p *MPointFromText) Description() string
Description implements sql.FunctionExpression
func (*MPointFromText) FunctionName ¶
func (p *MPointFromText) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*MPointFromText) String ¶
func (p *MPointFromText) String() string
func (*MPointFromText) Type ¶
func (p *MPointFromText) Type() sql.Type
Type implements the sql.Expression interface.
func (*MPointFromText) WithChildren ¶
func (p *MPointFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type MPointFromWKB ¶
type MPointFromWKB struct {
expression.NaryExpression
}
MPointFromWKB is a function that returns a linestring type from a WKB byte array
func (*MPointFromWKB) Description ¶
func (p *MPointFromWKB) Description() string
Description implements sql.FunctionExpression
func (*MPointFromWKB) FunctionName ¶
func (p *MPointFromWKB) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*MPointFromWKB) String ¶
func (p *MPointFromWKB) String() string
func (*MPointFromWKB) Type ¶
func (p *MPointFromWKB) Type() sql.Type
Type implements the sql.Expression interface.
func (*MPointFromWKB) WithChildren ¶
func (p *MPointFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type MPolyFromText ¶
type MPolyFromText struct {
expression.NaryExpression
}
MPolyFromText is a function that returns a MultiPolygon type from a WKT string
func (*MPolyFromText) Description ¶
func (p *MPolyFromText) Description() string
Description implements sql.FunctionExpression
func (*MPolyFromText) FunctionName ¶
func (p *MPolyFromText) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*MPolyFromText) String ¶
func (p *MPolyFromText) String() string
func (*MPolyFromText) Type ¶
func (p *MPolyFromText) Type() sql.Type
Type implements the sql.Expression interface.
func (*MPolyFromText) WithChildren ¶
func (p *MPolyFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type MPolyFromWKB ¶
type MPolyFromWKB struct {
expression.NaryExpression
}
MPolyFromWKB is a function that returns a polygon type from a WKB byte array
func (*MPolyFromWKB) Description ¶
func (p *MPolyFromWKB) Description() string
Description implements sql.FunctionExpression
func (*MPolyFromWKB) FunctionName ¶
func (p *MPolyFromWKB) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*MPolyFromWKB) String ¶
func (p *MPolyFromWKB) String() string
func (*MPolyFromWKB) Type ¶
func (p *MPolyFromWKB) Type() sql.Type
Type implements the sql.Expression interface.
func (*MPolyFromWKB) WithChildren ¶
func (p *MPolyFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type MultiLineString ¶
type MultiLineString struct {
expression.NaryExpression
}
MultiLineString is a function that returns a MultiLineString.
func (*MultiLineString) Description ¶
func (p *MultiLineString) Description() string
Description implements sql.FunctionExpression
func (*MultiLineString) FunctionName ¶
func (p *MultiLineString) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*MultiLineString) String ¶
func (p *MultiLineString) String() string
func (*MultiLineString) Type ¶
func (p *MultiLineString) Type() sql.Type
Type implements the sql.Expression interface.
func (*MultiLineString) WithChildren ¶
func (p *MultiLineString) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type MultiPoint ¶
type MultiPoint struct {
expression.NaryExpression
}
MultiPoint is a function that returns a set of Points.
func (*MultiPoint) Description ¶
func (l *MultiPoint) Description() string
Description implements sql.FunctionExpression
func (*MultiPoint) FunctionName ¶
func (l *MultiPoint) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*MultiPoint) String ¶
func (l *MultiPoint) String() string
func (*MultiPoint) Type ¶
func (l *MultiPoint) Type() sql.Type
Type implements the sql.Expression interface.
func (*MultiPoint) WithChildren ¶
func (l *MultiPoint) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type MultiPolygon ¶
type MultiPolygon struct {
expression.NaryExpression
}
MultiPolygon is a function that returns a MultiPolygon.
func (*MultiPolygon) Description ¶
func (p *MultiPolygon) Description() string
Description implements sql.FunctionExpression
func (*MultiPolygon) FunctionName ¶
func (p *MultiPolygon) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*MultiPolygon) String ¶
func (p *MultiPolygon) String() string
func (*MultiPolygon) Type ¶
func (p *MultiPolygon) Type() sql.Type
Type implements the sql.Expression interface.
func (*MultiPolygon) WithChildren ¶
func (p *MultiPolygon) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type Perimeter ¶
type Perimeter struct {
expression.NaryExpression
}
Perimeter is a function that returns the Perimeter of a Polygon Not in MySQL, basing off: https://postgis.net/docs/ST_Perimeter.html
func (*Perimeter) Description ¶
Description implements sql.FunctionExpression
func (*Perimeter) FunctionName ¶
FunctionName implements sql.FunctionExpression
func (*Perimeter) WithChildren ¶
func (p *Perimeter) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type Point ¶
type Point struct { X sql.Expression Y sql.Expression }
Point is a function that returns a point type containing values Y and Y.
func (*Point) Children ¶
func (p *Point) Children() []sql.Expression
Children implements the sql.Expression interface.
func (*Point) Description ¶
Description implements sql.FunctionExpression
func (*Point) FunctionName ¶
FunctionName implements sql.FunctionExpression
func (*Point) IsNullable ¶
IsNullable implements the sql.Expression interface.
func (*Point) WithChildren ¶
func (p *Point) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type PointFromText ¶
type PointFromText struct {
expression.NaryExpression
}
PointFromText is a function that returns a Point type from a WKT string
func (*PointFromText) Description ¶
func (p *PointFromText) Description() string
Description implements sql.FunctionExpression
func (*PointFromText) FunctionName ¶
func (p *PointFromText) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*PointFromText) String ¶
func (p *PointFromText) String() string
func (*PointFromText) Type ¶
func (p *PointFromText) Type() sql.Type
Type implements the sql.Expression interface.
func (*PointFromText) WithChildren ¶
func (p *PointFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type PointFromWKB ¶
type PointFromWKB struct {
expression.NaryExpression
}
PointFromWKB is a function that returns a point type from a WKB byte array
func (*PointFromWKB) Description ¶
func (p *PointFromWKB) Description() string
Description implements sql.FunctionExpression
func (*PointFromWKB) FunctionName ¶
func (p *PointFromWKB) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*PointFromWKB) String ¶
func (p *PointFromWKB) String() string
func (*PointFromWKB) Type ¶
func (p *PointFromWKB) Type() sql.Type
Type implements the sql.Expression interface.
func (*PointFromWKB) WithChildren ¶
func (p *PointFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type PolyFromText ¶
type PolyFromText struct {
expression.NaryExpression
}
PolyFromText is a function that returns a Polygon type from a WKT string
func (*PolyFromText) Description ¶
func (p *PolyFromText) Description() string
Description implements sql.FunctionExpression
func (*PolyFromText) FunctionName ¶
func (p *PolyFromText) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*PolyFromText) String ¶
func (p *PolyFromText) String() string
func (*PolyFromText) Type ¶
func (p *PolyFromText) Type() sql.Type
Type implements the sql.Expression interface.
func (*PolyFromText) WithChildren ¶
func (p *PolyFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type PolyFromWKB ¶
type PolyFromWKB struct {
expression.NaryExpression
}
PolyFromWKB is a function that returns a polygon type from a WKB byte array
func (*PolyFromWKB) Description ¶
func (p *PolyFromWKB) Description() string
Description implements sql.FunctionExpression
func (*PolyFromWKB) FunctionName ¶
func (p *PolyFromWKB) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*PolyFromWKB) String ¶
func (p *PolyFromWKB) String() string
func (*PolyFromWKB) Type ¶
func (p *PolyFromWKB) Type() sql.Type
Type implements the sql.Expression interface.
func (*PolyFromWKB) WithChildren ¶
func (p *PolyFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type Polygon ¶
type Polygon struct {
expression.NaryExpression
}
Polygon is a function that returns a Polygon.
func (*Polygon) Description ¶
Description implements sql.FunctionExpression
func (*Polygon) FunctionName ¶
FunctionName implements sql.FunctionExpression
func (*Polygon) WithChildren ¶
func (p *Polygon) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type SRID ¶
type SRID struct {
expression.NaryExpression
}
SRID is a function that returns SRID of Geometry object or returns a new object with altered SRID.
func (*SRID) Description ¶
Description implements sql.FunctionExpression
func (*SRID) FunctionName ¶
FunctionName implements sql.FunctionExpression
func (*SRID) WithChildren ¶
func (s *SRID) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type STLength ¶
type STLength struct {
expression.NaryExpression
}
STLength is a function that returns the STLength of a LineString
func (*STLength) Description ¶
Description implements sql.FunctionExpression
func (*STLength) FunctionName ¶
FunctionName implements sql.FunctionExpression
func (*STLength) WithChildren ¶
func (s *STLength) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type STX ¶
type STX struct {
expression.NaryExpression
}
STX is a function that returns the x value from a given point.
func (*STX) Description ¶
Description implements sql.FunctionExpression
func (*STX) FunctionName ¶
FunctionName implements sql.FunctionExpression
func (*STX) WithChildren ¶
func (s *STX) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type STY ¶
type STY struct {
expression.NaryExpression
}
STY is a function that returns the y value from a given point.
func (*STY) Description ¶
Description implements sql.FunctionExpression
func (*STY) FunctionName ¶
FunctionName implements sql.FunctionExpression
func (*STY) WithChildren ¶
func (s *STY) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type SpatialRef ¶
type StartPoint ¶
type StartPoint struct {
expression.UnaryExpression
}
StartPoint is a function that returns the first point of a LineString
func (*StartPoint) Description ¶
func (s *StartPoint) Description() string
Description implements sql.FunctionExpression
func (*StartPoint) FunctionName ¶
func (s *StartPoint) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*StartPoint) String ¶
func (s *StartPoint) String() string
func (*StartPoint) Type ¶
func (s *StartPoint) Type() sql.Type
Type implements the sql.Expression interface.
func (*StartPoint) WithChildren ¶
func (s *StartPoint) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type SwapXY ¶
type SwapXY struct {
expression.UnaryExpression
}
SwapXY is a function that returns a spatial type with their X and Y values swapped
func (*SwapXY) Description ¶
Description implements sql.FunctionExpression
func (*SwapXY) FunctionName ¶
FunctionName implements sql.FunctionExpression
func (*SwapXY) IsNullable ¶
IsNullable implements the sql.Expression interface.
func (*SwapXY) WithChildren ¶
func (s *SwapXY) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type Within ¶
type Within struct {
expression.BinaryExpression
}
Within is a function that true if left is spatially within right
func (*Within) Description ¶
Description implements sql.FunctionExpression
func (*Within) FunctionName ¶
FunctionName implements sql.FunctionExpression
func (*Within) WithChildren ¶
func (w *Within) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
Source Files ¶
- geojson.go
- geometry_collection.go
- linestring.go
- multilinestring.go
- multipoint.go
- multipolygon.go
- point.go
- polygon.go
- spatial_reference.go
- st_area.go
- st_dimension.go
- st_distance.go
- st_intersects.go
- st_length.go
- st_linestring.go
- st_perimeter.go
- st_srid.go
- st_swapxy.go
- st_within.go
- wkb.go
- wkt.go
- x_y_latitude_longitude.go