Skip to content

Commit

Permalink
Merge pull request #1265 from M3nin0/roi-clean
Browse files Browse the repository at this point in the history
sits_get_data: clean `roi` data
  • Loading branch information
gilbertocamara authored Jan 15, 2025
2 parents 3092d88 + 4a47744 commit 11ff526
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/api_roi.R
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ NULL
if (.has(as_crs)) {
roi <- sf::st_transform(roi, crs = as_crs)
}
# Clean roi
roi <- .sf_clean(roi)
# Transform feature to multipolygons
roi <- if (.has(nrow(roi)) && nrow(roi) > 1) sf::st_union(roi) else roi
# Return roi
Expand Down

0 comments on commit 11ff526

Please sign in to comment.