MCPcopy Create free account
hub / github.com/dolthub/doltgresql / Covers

Method Covers

postgres/parser/geo/bbox.go:194–202  ·  view source on GitHub ↗

Covers returns whether the BoundingBox covers the other bounding box. Empty bounding boxes never cover.

(o *CartesianBoundingBox)

Source from the content-addressed store, hash-verified

192// Covers returns whether the BoundingBox covers the other bounding box.
193// Empty bounding boxes never cover.
194func (b *CartesianBoundingBox) Covers(o *CartesianBoundingBox) bool {
195 if b == nil || o == nil {
196 return false
197 }
198 return b.LoX <= o.LoX && o.LoX <= b.HiX &&
199 b.LoX <= o.HiX && o.HiX <= b.HiX &&
200 b.LoY <= o.LoY && o.LoY <= b.HiY &&
201 b.LoY <= o.HiY && o.HiY <= b.HiY
202}
203
204// ToGeomT converts a BoundingBox to a GeomT.
205func (b *CartesianBoundingBox) ToGeomT(srid geopb.SRID) geom.T {

Callers 1

eval.goFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected