[−][src]Trait geo::algorithm::bounding_rect::BoundingRect
Calculation of the bounding rectangle of a geometry.
Associated Types
type Output
Required methods
fn bounding_rect(&self) -> Self::Output
Return the bounding rectangle of a geometry
Examples
use geo::algorithm::bounding_rect::BoundingRect; use geo::line_string; let line_string = line_string![ (x: 40.02f64, y: 116.34), (x: 42.02f64, y: 116.34), (x: 42.02f64, y: 118.34), ]; let bounding_rect = line_string.bounding_rect().unwrap(); assert_eq!(40.02f64, bounding_rect.min().x); assert_eq!(42.02f64, bounding_rect.max().x); assert_eq!(116.34, bounding_rect.min().y); assert_eq!(118.34, bounding_rect.max().y);
Implementors
impl<T> BoundingRect<T> for Geometry<T> where
T: CoordinateType,
[src]
T: CoordinateType,
impl<T> BoundingRect<T> for GeometryCollection<T> where
T: CoordinateType,
[src]
T: CoordinateType,
impl<T> BoundingRect<T> for Line<T> where
T: CoordinateType,
[src]
T: CoordinateType,
type Output = Rect<T>
fn bounding_rect(&self) -> Self::Output
[src]
impl<T> BoundingRect<T> for LineString<T> where
T: CoordinateType,
[src]
T: CoordinateType,
type Output = Option<Rect<T>>
fn bounding_rect(&self) -> Self::Output
[src]
Return the BoundingRect for a LineString
impl<T> BoundingRect<T> for MultiLineString<T> where
T: CoordinateType,
[src]
T: CoordinateType,
type Output = Option<Rect<T>>
fn bounding_rect(&self) -> Self::Output
[src]
Return the BoundingRect for a MultiLineString
impl<T> BoundingRect<T> for MultiPoint<T> where
T: CoordinateType,
[src]
T: CoordinateType,
type Output = Option<Rect<T>>
fn bounding_rect(&self) -> Self::Output
[src]
Return the BoundingRect for a MultiPoint
impl<T> BoundingRect<T> for MultiPolygon<T> where
T: CoordinateType,
[src]
T: CoordinateType,
type Output = Option<Rect<T>>
fn bounding_rect(&self) -> Self::Output
[src]
Return the BoundingRect for a MultiPolygon
impl<T> BoundingRect<T> for Point<T> where
T: CoordinateType,
[src]
T: CoordinateType,
type Output = Rect<T>
fn bounding_rect(&self) -> Self::Output
[src]
Return the bounding rectangle for a Point
. It will have zero width
and zero height.
impl<T> BoundingRect<T> for Polygon<T> where
T: CoordinateType,
[src]
T: CoordinateType,
type Output = Option<Rect<T>>
fn bounding_rect(&self) -> Self::Output
[src]
Return the BoundingRect for a Polygon
impl<T> BoundingRect<T> for Rect<T> where
T: CoordinateType,
[src]
T: CoordinateType,
type Output = Rect<T>
fn bounding_rect(&self) -> Self::Output
[src]
impl<T> BoundingRect<T> for Triangle<T> where
T: CoordinateType,
[src]
T: CoordinateType,