keep_big_polygons: Exclude small polygons from SpatialPolygons object

Description Usage Arguments Value Examples

View source: R/helpers.R

Description

Exclude small polygons from SpatialPolygons object

Usage

1
keep_big_polygons(polygons, threshold_size)

Arguments

polygons

SpatialPolygonsDataFrame object.

threshold_size

(numeric) threshold value of area to determine whether polygons are big or not. Areas must be according to projection of polygons.

Value

A SpatialPolygonsDataFrame with polygons with areas above threshold_size.

Examples

1
2
3
4
5
data("spdf_range", package = "rangemap")
sp::plot(spdf_range)

big_polys <- keep_big_polygons(polygons = spdf_range, threshold_size = 0.2)
sp::plot(big_polys)

rangemap documentation built on Sept. 5, 2021, 5:17 p.m.