Trait libreda_db::prelude::traits::TryBoundingBox

source ·
pub trait TryBoundingBox<T> {
    // Required method
    fn try_bounding_box(&self) -> Option<Rect<T>>;
}
Expand description

Try the calculation of the ‘bounding box’, i.e. the smallest rectangle that contains the geometrical object. In some cases this is not always possible, so the try might fail. For instance a set of polygons does not have a bounding box if the set is empty.

Required Methods§

source

fn try_bounding_box(&self) -> Option<Rect<T>>

Return the bounding box of this geometry if a bounding box is defined.

Implementors§

source§

impl<C: CoordinateType> TryBoundingBox<C> for Shapes<C>

source§

impl<T> TryBoundingBox<T> for Geometry<T>
where T: Copy + PartialOrd + Num,

source§

impl<T> TryBoundingBox<T> for Edge<T>
where T: Copy + PartialOrd,

source§

impl<T> TryBoundingBox<T> for MultiPolygon<T>
where T: CoordinateType,

source§

impl<T> TryBoundingBox<T> for Path<T>
where T: Copy + PartialOrd + Num,

source§

impl<T> TryBoundingBox<T> for Point<T>
where T: Copy,

source§

impl<T> TryBoundingBox<T> for PointString<T>
where T: Copy + PartialOrd,

source§

impl<T> TryBoundingBox<T> for Polygon<T>
where T: Copy + PartialOrd,

source§

impl<T> TryBoundingBox<T> for REdge<T>
where T: CoordinateType,

source§

impl<T> TryBoundingBox<T> for Rect<T>
where T: Copy,

source§

impl<T> TryBoundingBox<T> for SimplePolygon<T>
where T: Copy + PartialOrd,

source§

impl<T> TryBoundingBox<T> for SimpleRPolygon<T>
where T: Copy + PartialOrd,

source§

impl<T, S> TryBoundingBox<T> for Text<T, S>
where T: Copy + PartialOrd,