From 4a477442a7e0ee34eff57c1b52d331c55124adb2 Mon Sep 17 00:00:00 2001 From: Felipe Carlos Date: Tue, 14 Jan 2025 21:20:36 -0300 Subject: [PATCH] sits_get_data: clean roi data (Closes #1264) --- R/api_roi.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/api_roi.R b/R/api_roi.R index fa821388..7c5604e6 100644 --- a/R/api_roi.R +++ b/R/api_roi.R @@ -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