Documentation ¶
Overview ¶
Package envelope Defines a rectangular region of the 2D coordinate plane.
Index ¶
- func IsIntersects(p1, p2, q matrix.Matrix) bool
- func IsIntersectsTwo(p1, p2, q1, q2 matrix.Matrix) bool
- type Envelope
- func Bound(b []matrix.Matrix) *Envelope
- func Empty() *Envelope
- func Env(env *Envelope) *Envelope
- func FourFloat(x1, x2, y1, y2 float64) *Envelope
- func Matrix(p matrix.Matrix) *Envelope
- func MatrixList(ps []matrix.Matrix) *Envelope
- func PolygonMatrixList(ps []matrix.PolygonMatrix) *Envelope
- func TwoMatrix(p1, p2 matrix.Matrix) *Envelope
- func (e *Envelope) Area() float64
- func (e *Envelope) Centre() matrix.Matrix
- func (e *Envelope) CompareTo(other *Envelope) int
- func (e *Envelope) Contains(other *Envelope) bool
- func (e *Envelope) Copy() *Envelope
- func (e *Envelope) Covers(other *Envelope) bool
- func (e *Envelope) Diameter() float64
- func (e *Envelope) Disjoint(other *Envelope) bool
- func (e *Envelope) Distance(env *Envelope) float64
- func (e *Envelope) Equals(other *Envelope) bool
- func (e *Envelope) ExpandBy(distance float64)
- func (e *Envelope) ExpandByXY(deltaX, deltaY float64)
- func (e *Envelope) ExpandToInclude(x, y float64)
- func (e *Envelope) ExpandToIncludeEnv(other *Envelope)
- func (e *Envelope) ExpandToIncludeMatrix(p matrix.Matrix)
- func (e *Envelope) HashCode() int
- func (e *Envelope) Height() float64
- func (e *Envelope) Intersection(env *Envelope) *Envelope
- func (e *Envelope) IsIntersects(other *Envelope) bool
- func (e *Envelope) IsNil() bool
- func (e *Envelope) MaxExtent() float64
- func (e *Envelope) MinExtent() float64
- func (e *Envelope) Overlaps(other *Envelope) bool
- func (e *Envelope) Proximity(other *Envelope) bool
- func (e *Envelope) SetToNil()
- func (e *Envelope) ToMatrix() *matrix.PolygonMatrix
- func (e *Envelope) ToString() string
- func (e *Envelope) Translate(transX, transY float64)
- func (e *Envelope) Width() float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsIntersects ¶
IsIntersects Test the point q to see whether it intersects the Envelope defined by p1-p2
func IsIntersectsTwo ¶
IsIntersectsTwo Tests whether the envelope defined by p1-p2 and the envelope defined by q1-q2 intersect.
Types ¶
type Envelope ¶
type Envelope struct {
MaxX, MinX, MaxY, MinY float64
}
Envelope Defines a rectangular region of the 2D coordinate plane.
It is often used to represent the bounding box of a Geometry, Envelopes support infinite or half-infinite regions, by using the values of Double.POSITIVE_INFINITY and Double.NEGATIVE_INFINITY. Envelope objects may have a null value. When Envelope objects are created or initialized, the supplies extent values are automatically sorted into the correct order.
func MatrixList ¶ added in v1.0.4
MatrixList Creates an Envelope from a matrix list
func PolygonMatrixList ¶ added in v1.0.4
func PolygonMatrixList(ps []matrix.PolygonMatrix) *Envelope
PolygonMatrixList Creates an Envelope from a polygon matrix list
func (*Envelope) Centre ¶
Centre Computes the coordinate of the centre of this envelope (as long as it is non-null
func (*Envelope) Contains ¶
Contains Tests if the Envelope other lies wholely inside this Envelope (inclusive of the boundary).
func (*Envelope) Covers ¶
Covers Tests if the Envelope other lies wholely inside this Envelope (inclusive of the boundary).
func (*Envelope) Disjoint ¶
Disjoint Tests if the region defined by other is disjoint from the region of this Envelope.
func (*Envelope) ExpandBy ¶
ExpandBy Expands this envelope by a given distance in all directions. Both positive and negative distances are supported.
func (*Envelope) ExpandByXY ¶
ExpandByXY Expands this envelope by a given distance in all directions. Both positive and negative distances are supported.
func (*Envelope) ExpandToInclude ¶
ExpandToInclude Enlarges this Envelope so that it contains the given point. Has no effect if the point is already on or within the envelope.
func (*Envelope) ExpandToIncludeEnv ¶
ExpandToIncludeEnv Enlarges this Envelope so that it contains the other Envelope.
Has no effect if other is wholly on or within the envelope.
func (*Envelope) ExpandToIncludeMatrix ¶
ExpandToIncludeMatrix Enlarges this Envelope so that it contains
func (*Envelope) HashCode ¶
HashCode Computes a hash code for a double value, using the algorithm from Joshua Bloch's book
func (*Envelope) Intersection ¶
Intersection Computes the intersection of two Envelopes.
func (*Envelope) IsIntersects ¶
IsIntersects Tests if the region defined by other intersects the region of this Envelope.
func (*Envelope) MaxExtent ¶
MaxExtent Gets the maximum extent of this envelope across both dimensions.
func (*Envelope) MinExtent ¶
MinExtent Gets the minimum extent of this envelope across both dimensions.
func (*Envelope) Overlaps ¶
Overlaps overlaps may be changed to be a true overlap check; that is, whether the intersection is two-dimensional.
func (*Envelope) SetToNil ¶
func (e *Envelope) SetToNil()
SetToNil Makes this Envelope a "null" envelope, that is, the envelope
of the empty geometry.
func (*Envelope) ToMatrix ¶ added in v1.0.4
func (e *Envelope) ToMatrix() *matrix.PolygonMatrix
ToMatrix ...