[−][src]Trait geo::algorithm::area::Area
Calculation of the area.
Required methods
fn area(&self) -> T
Signed area of a geometry.
Examples
use geo::{Coordinate, Point, LineString, Polygon}; use geo::algorithm::area::Area; let mut polygon = Polygon::new(LineString::from(vec![ (0., 0.), (5., 0.), (5., 6.), (0., 6.), (0., 0.) ]), vec![]); assert_eq!(polygon.area(), 30.); polygon.exterior_mut(|line_string| { line_string.0.reverse(); }); assert_eq!(polygon.area(), -30.);
Implementors
impl<T> Area<T> for Line<T> where
T: CoordinateType,
[src]
T: CoordinateType,
impl<T> Area<T> for MultiPolygon<T> where
T: Float,
[src]
T: Float,
impl<T> Area<T> for Polygon<T> where
T: Float,
[src]
T: Float,
impl<T> Area<T> for Rect<T> where
T: CoordinateType,
[src]
T: CoordinateType,
impl<T> Area<T> for Triangle<T> where
T: Float,
[src]
T: Float,