Skip to content

Commit

Permalink
depurate allows multiplygon boundary
Browse files Browse the repository at this point in the history
  • Loading branch information
PPaccioretti committed Jul 7, 2024
1 parent 7b4fced commit d71dd7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# paar 0.0.0.9003 (development version)

* Now `depurate` function allows to use MULTIPOLYGON objects.
* Build vignette for `kmspc` function.
* Build vignette for `depurate` function.
* New `cbind.paar` function to bind the condition of one paar object with a
Expand Down
4 changes: 2 additions & 2 deletions R/depurate.R
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ remove_border <- function(x,
stop('poly_border must be an sf object', call. = FALSE)
}

if (unique(sf::st_geometry_type(poly_border)) != 'POLYGON') {
stop('poly_border must have only POLYGON as geometry type',
if (!unique(sf::st_geometry_type(poly_border)) %in% c('POLYGON', 'MULTIPOLYGON')) {
stop('poly_border must have only POLYGON or MULTIPOLYGON as geometry type',
call. = FALSE)
}

Expand Down

0 comments on commit d71dd7a

Please sign in to comment.