Covers returns whether the BoundingBox covers the other bounding box. Empty bounding boxes never cover.
(o *CartesianBoundingBox)
| 192 | // Covers returns whether the BoundingBox covers the other bounding box. |
| 193 | // Empty bounding boxes never cover. |
| 194 | func (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. |
| 205 | func (b *CartesianBoundingBox) ToGeomT(srid geopb.SRID) geom.T { |