# dsn <- sds::nsidc_seaice()
# library(terra)
# plot(rast(dsn))
#e <- draw()
#dput(round(as.vector(e)))
## pole inside extent, south polar steregraphic
e <- c(xmin = -1094338, xmax = 1230070, ymin = -699223, ymax = 997424)
xyedge <- vaster::vaster_boundary(c(64, 64), e)
## reproj_extent infills the source extent to not miss the pole
vaster::plot_extent(reproj::reproj_extent(e, "EPSG:4326", source = "EPSG:3031"), asp = "")
lines(reproj::reproj_xy(xyedge, "EPSG:4326", source = "EPSG:3031"), lty = 2)## terra vect/project has the same problem but rast/project does the job
library(terra)
#> terra 1.9.41
plot(ext(project(rast(ext(xyedge), ncols = 64, nrows = 64, crs = "EPSG:3031"), "EPSG:4326")))
plot(project(vect(xyedge, "poly", crs = "EPSG:3031"), "EPSG:4326"), add = TRUE, lty = 2)Created on 2026-08-07 with reprex v2.1.1

