From 531b75d5722e9dd044803301d832b08dae132a0b Mon Sep 17 00:00:00 2001 From: Sylvain Piry <85288208+spiry34@users.noreply.github.com> Date: Thu, 27 Oct 2022 13:32:28 +0200 Subject: [PATCH] Update hemisphere.R recent s2 appear to return x and y columns so colnames added for compatibility --- R/hemisphere.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/hemisphere.R b/R/hemisphere.R index c4d75ec..6ea8b43 100644 --- a/R/hemisphere.R +++ b/R/hemisphere.R @@ -54,6 +54,7 @@ make_hemisphere <- function(lng, lat, detail = 10000, epsilon = 0.1, precision = great_circle_point <- s2::as_s2_point(as.matrix(great_circle_df)) great_circle_latlng <- unique(round(as.data.frame(s2::as_s2_lnglat(great_circle_point)), precision)) + colnames(great_circle_latlng) <- c("lng", "lat") # close the ring rbind(great_circle_latlng, great_circle_latlng[1, , drop = FALSE])[c("lng", "lat")]