Takes a dataframe at returns an sf object.

geom_from_boundary(df, epsg, add = T)

Arguments

df

A dataframe including the columns xmin, xmax, ymin, max

epsg

Intger value of the CRS the data is set to.

add

A boolean determining whether the geometries should be added to the input dataframe (add = TRUE) or if only the geometries should be returned (add = FALSE).

Details

This function takes a dataframe and returns an sf object. The dataframe must contain the columns, xmin, xmax, ymin, max, which will be turned into the edges of a rectangular sf polygon.