Skip to main content

buffer_polygon

Function buffer_polygon 

Source
pub fn buffer_polygon(
    polygon: &Polygon,
    distance: f64,
    options: &BufferOptions,
) -> Result<Polygon>
Expand description

Generates a buffer around a polygon

For positive distances, expands the polygon. For negative distances, performs erosion (inward buffer).

§Arguments

  • polygon - The polygon to buffer
  • distance - Buffer distance (positive expands, negative erodes)
  • options - Buffer options

§Errors

Returns error if polygon is invalid