Documentation
¶
Index ¶
- func Area(s Shape) aspect.Clause
- func AreaOf(c aspect.ColumnElem) aspect.ColumnElem
- func AsBinary(c aspect.ColumnElem) aspect.ColumnElem
- func AsEWKT(c aspect.ColumnElem) aspect.ColumnElem
- func AsGML(c aspect.ColumnElem) aspect.ColumnElem
- func AsGeoJSON(c aspect.ColumnElem) aspect.ColumnElem
- func AsGeography(c aspect.ColumnElem) aspect.ColumnElem
- func AsGeometry(c aspect.ColumnElem) aspect.ColumnElem
- func AsKML(c aspect.ColumnElem) aspect.ColumnElem
- func AsKMLVersion(c aspect.ColumnElem, version, maxdigits int) aspect.ColumnElem
- func AsLatLon(c aspect.ColumnElem) aspect.ColumnElem
- func AsSVG(c aspect.ColumnElem) aspect.ColumnElem
- func AsText(c aspect.ColumnElem) aspect.ColumnElem
- func DWithin(c aspect.ColumnElem, s Shape, d int) aspect.Clause
- func GeoHash(c aspect.ColumnElem) aspect.ColumnElem
- func Intersects(c aspect.ColumnElem, s Shape) aspect.Clause
- func Within(c aspect.ColumnElem, s Shape) aspect.Clause
- type Geometry
- type LatLong
- type Linestring
- type MultiPoint
- type Point
- type Polygon
- type Shape
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Area ¶
Returns the area of the surface if it is a polygon or multi-polygon. For "geometry" type area is in SRID units. For "geography" area is in square meters.
func AreaOf ¶
func AreaOf(c aspect.ColumnElem) aspect.ColumnElem
Returns the area of the given column For "geometry" type area is in SRID units. For "geography" area is in square meters.
func AsBinary ¶
func AsBinary(c aspect.ColumnElem) aspect.ColumnElem
Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data
func AsEWKT ¶
func AsEWKT(c aspect.ColumnElem) aspect.ColumnElem
Return the Well-Known Text (WKT) representation of the geometry with SRID meta data
func AsGML ¶
func AsGML(c aspect.ColumnElem) aspect.ColumnElem
Return the geometry as a GML version 2 or 3 element
func AsGeoJSON ¶
func AsGeoJSON(c aspect.ColumnElem) aspect.ColumnElem
Return the geometry as a GeoJSON element
func AsGeography ¶
func AsGeography(c aspect.ColumnElem) aspect.ColumnElem
func AsGeometry ¶
func AsGeometry(c aspect.ColumnElem) aspect.ColumnElem
func AsKML ¶
func AsKML(c aspect.ColumnElem) aspect.ColumnElem
Return the geometry as a KML element with default version=2 and precision=15
func AsKMLVersion ¶
func AsKMLVersion(c aspect.ColumnElem, version, maxdigits int) aspect.ColumnElem
Return the geometry as a KML element.
func AsLatLon ¶
func AsLatLon(c aspect.ColumnElem) aspect.ColumnElem
Return the Degrees, Minutes, Seconds representation of the given point
func AsSVG ¶
func AsSVG(c aspect.ColumnElem) aspect.ColumnElem
Returns a Geometry in SVG path data given a geometry or geography object
func AsText ¶
func AsText(c aspect.ColumnElem) aspect.ColumnElem
Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata
func GeoHash ¶
func GeoHash(c aspect.ColumnElem) aspect.ColumnElem
Return a GeoHash representation of the geometry.
func Intersects ¶
func Intersects(c aspect.ColumnElem, s Shape) aspect.Clause
ST_Intersects — Returns TRUE if the Geometries/Geography "spatially intersect in 2D" - (share any portion of space) and FALSE if they don't (they are Disjoint). For geography -- tolerance is 0.00001 meters (so any points that close are considered to intersect)
Types ¶
type LatLong ¶
type LatLong struct {
Latitude, Longitude float64
}
type Linestring ¶
type Linestring struct {
Points []Point
}
func (Linestring) Compile ¶
func (p Linestring) Compile(d aspect.Dialect, params *aspect.Parameters) (string, error)
func (Linestring) String ¶
func (p Linestring) String() string
String returns the element's SQL using the default dialect.
type MultiPoint ¶
type MultiPoint struct {
Points []Point
}
func (MultiPoint) Compile ¶
func (p MultiPoint) Compile(d aspect.Dialect, params *aspect.Parameters) (string, error)
TODO
func (MultiPoint) String ¶
func (p MultiPoint) String() string
String returns the element's SQL using the default dialect.
type Polygon ¶
type Polygon struct { Exterior Linestring Interiors []Linestring }