View source: R/keep_areas_gt.R
keep_areas_gt | R Documentation |
Drop non-contiguous polygons with area smaller or equal lower_bound.
keep_areas_gt( an_area = NULL, lower_bound = 0, new_name = NULL, dir_path = NULL )
an_area |
A |
lower_bound |
A lower bound area indicating polygons which it going to dropped out. |
new_name |
A name to new area study after dropping smaller polygons. |
A SDM_area
containing an object of package
sp
(https://cran.r-project.org/web/packages/sp)
with remaining disaggregated polygons with area greater than lower_bound.
## Not run: new_SPDF <- SP %>% as("SpatialPolygonsDataFrame") new_SPDF@data <- list( area=c( SP[1] %>% gArea(), SP[2] %>% gArea(), SP[3] %>% gArea() ) ) %>% as.data.frame() plot(new_SPDF) new_area <- new_SPDF %>% sdm_area( "Removing a single area from a SpatialPolygons study area.", "EPSG:6933", c(50000, 50000) ) %>% keep_areas_gt( 0.25, new_name = "Removing a single area from a SpatialPolygons study area." ) plot(new_area$study_area) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.