scale_exterior

Function scale_exterior 

Source
pub fn scale_exterior<T>(
    geometry: &Geometry<T>,
    distance: T,
) -> Result<Geometry<T>, String>
Expand description

scales the exterior points of a geometry by some distance. the distance should be in the unit that matches the output of the parameterized Distance trait. for example, using geo::Haversine expects points in WGS84 lat/lon degrees and outputs distances in meters, so, distance should be provided in meters.

distances may be negative.

§Arguments

  • geometry - the geometry to scale, must be a Polygon or MultiPolygon
  • distance - distance to extend all sides of the extent of the geometry

§Returns

The scaled geometry, a polygon