invert_polygon: Invert a Polygon
Description
This function inverts a polygon by calculating the difference between the bounding box and the polygon.
Usage
invert_polygon(polygon, bbox = NULL)
Value
An sf object representing the inverted polygon.
Arguments
- polygon
An sf object representing the polygon to be inverted.
- bbox
Optional. An sf or bbox object representing the bounding box. If NULL, the bounding box of the input polygon is used.