prj <- "+proj=stere +lat_0=-90 +lat_ts=-70 +datum=WGS84"
f <- "~/FastIce_70_2006.nc"
ex <- c(-2700000, -2700000 + 5625 * 1000, -2397000, -2397000 + 4700 * 1000)
library(terra)
r <- rast(f, "Fast_Ice_Time_series")
set.ext(r, ext(ex))
set.crs(r, crs(prj))
## read polygons of antarctica
ant <- vect("/vsizip//vsicurl/https://github.com/wmgeolab/geoBoundaries/raw/main/releaseData/CGAZ/geoBoundariesCGAZ_ADM0.zip",
query = "SELECT shapeGroup FROM geoBoundariesCGAZ_ADM0 WHERE shapeGroup IN ('ATA')")
ant <- project(ant, crs(r))
plot(r[[1]])
plot(ant, add = TRUE)
## a test, convert to longlat just one layer
ll <- project(r[[1]], "EPSG:4326", by_util = TRUE)
plot(ll)
maps::map(add = TRUE)
Created
January 23, 2025 00:18
-
-
Save mdsumner/b93a079044b55d0b842a26fd34afc056 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment