Documentation ¶
Index ¶
- func Area(pts []maths.Pt) (a float64)
- func BBox(pts []maths.Pt) (bb [4]float64)
- func BBoxFloat64(pts ...[2]float64) (bb [2][2]float64, err error)
- func Centroid(pts []maths.Pt) (center maths.Pt)
- func Paired(pts []maths.Pt) ([][2]maths.Pt, error)
- func Reverse(a []maths.Pt) []maths.Pt
- func RotatePos(pts []maths.Pt, pos int)
- func RotateToLowestsFirst(pts []maths.Pt)
- func SinArea(pts []maths.Pt) (a float64)
- func SlopeIntercept(pt1, pt2 maths.Pt) (m, b float64, defined bool)
- func SortAndUnique(pts []maths.Pt) []maths.Pt
- type BoundingBox
- func (bb BoundingBox) Area() float64
- func (bb BoundingBox) AsGeoJSON() string
- func (bb BoundingBox) ContainBB(bb1 [4]float64) bool
- func (bb BoundingBox) Contains(pt maths.Pt) bool
- func (bb BoundingBox) ContainsLine(l maths.Line) bool
- func (bb BoundingBox) ConvertSRID(fromID, toID uint64) BoundingBox
- func (bb BoundingBox) DisjointBB(bbox2 [4]float64) bool
- func (bb BoundingBox) LREdges() [4]maths.Line
- func (bb BoundingBox) PointAt(i int) maths.Pt
- type ByXY
- type Extent
- func (e Extent) Area() float64
- func (e Extent) Contains(pt [2]float64) bool
- func (e Extent) ContainsExtent(ee Extent) bool
- func (e Extent) ContainsLine(line [2][2]float64) bool
- func (e Extent) ContainsPoints(pts ...[2]float64) bool
- func (e Extent) Edges() [][2][2]float64
- func (e Extent) InclusiveContainsLine(line [2][2]float64) bool
- func (e Extent) IntersectPt(ln [2][2]float64) (pts [][2]float64, ok bool)
- func (e Extent) LREdges() [][2][2]float64
- func (e Extent) LowerLeft() [2]float64
- func (e Extent) LowerRight() [2]float64
- func (e Extent) TopLeft() [2]float64
- func (e Extent) TopRight() [2]float64
- func (e Extent) Verticies() [][2]float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BBoxFloat64 ¶ added in v0.6.0
func RotateToLowestsFirst ¶
Types ¶
type BoundingBox ¶
type BoundingBox [4]float64
func (BoundingBox) Area ¶
func (bb BoundingBox) Area() float64
func (BoundingBox) AsGeoJSON ¶ added in v0.6.0
func (bb BoundingBox) AsGeoJSON() string
func (BoundingBox) ContainBB ¶
func (bb BoundingBox) ContainBB(bb1 [4]float64) bool
func (BoundingBox) ContainsLine ¶
func (bb BoundingBox) ContainsLine(l maths.Line) bool
func (BoundingBox) ConvertSRID ¶ added in v0.6.0
func (bb BoundingBox) ConvertSRID(fromID, toID uint64) BoundingBox
func (BoundingBox) DisjointBB ¶ added in v0.6.0
func (bb BoundingBox) DisjointBB(bbox2 [4]float64) bool
func (BoundingBox) LREdges ¶
func (bb BoundingBox) LREdges() [4]maths.Line
type Extent ¶ added in v0.6.0
type Extent [2][2]float64
Extent describes a retangular region.
func (Extent) Contains ¶ added in v0.6.0
Contains return weather the point is contained by the Extent.
func (Extent) ContainsExtent ¶ added in v0.6.0
ContainsExtent returns weather the points of the second extent are containted by the first extent.
func (Extent) ContainsLine ¶ added in v0.6.0
ContainsLine returns weather both points of the line are contained by the Extent.
func (Extent) ContainsPoints ¶ added in v0.6.0
ContainsPoints returns weather all the given points are contained by the Extent.
func (Extent) Edges ¶ added in v0.6.0
Edges return in clockwise order the edges that make up this extent. And edge is a line made up of two points.
func (Extent) InclusiveContainsLine ¶ added in v0.6.0
func (Extent) IntersectPt ¶ added in v0.6.0
IntersectPt returns the intersect point if one exists.
func (Extent) LREdges ¶ added in v0.6.0
LREdges returns the edges of the region so that the upper left most edges to the lower right edges are returned. Basically sorting by the x values first then the y values.