session_grid(NULL)
a <- ursa_dummy(nband=1)
print(ursa_crs(a))
p4s <- "+init=epsg:3576"
ursa_crs(a) <- p4s
print(ursa_crs(a))
fname <- tempfile()
write_envi(a,fname)
a2 <- read_envi(fname,resetGrid=TRUE)
print(ursa_crs(a2))
# try(print(rgdal::CRSargs(sp::CRS(p4s)))) ## 'rgdal' is retired
envi_remove(fname)
Run the code above in your browser using DataLab