Dear list members,

When using the function writeRaster (raster package) the coord. ref shows
NA, even when the raster has a coord. ref.

How can I keep the coord. ref. in my output raster?

> show(distAc_gam)
class       : RasterLayer
dimensions  : 477, 746, 355842  (nrow, ncol, ncell)
resolution  : 100, 100  (x, y)
extent      : 450664.7, 525264.7, 1076344, 1124044  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=tmerc +lon_0=-84 +lat_0=0 +x_0=500000 +k=0.9999
+datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
data source : in memory
names       : layer
values      : 0, 12081.39  (min, max)


> writeRaster(distAc_gam, filename = "Raster_distAc.asc", overwrite = TRUE)
class       : RasterLayer
dimensions  : 477, 746, 355842  (nrow, ncol, ncell)
resolution  : 100, 100  (x, y)
extent      : 450664.7, 525264.7, 1076344, 1124044  (xmin, xmax, ymin, ymax)
coord. ref. : NA
data source :
/Users/manuelspinola/Dropbox/Proyectos_en_R/Viviana_Narvaez/Raster_distAc.asc
names       : Raster_distAc





-- 
*Manuel Spínola, Ph.D.*
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspinola@una.ac.cr
mspinola10@gmail.com
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website: Lobito de río <https://sites.google.com/site/lobitoderio/>
Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>

	[[alternative HTML version deleted]]

