export to .asc or .grd files
Hi Carsten,
Thanks for your help. I never used rgdal before and therefore do not
understand what drivername is.
When I try your proposition, I ve got the following error message:
Error in .local(.Object, ...) :
GDAL Error 6: GDALDriver::Create() ... no create method
implemented for this format.
Where am I wrong?
best regards,
max
Le 21/12/2010 12:21, Carsten Neumann a ?crit :
Am 20.12.2010 18:02, schrieb Maxime Pauwels:
Hi list, I'm using the sp package to grid data. I'd now like to export the grid in either .asc or .grd files. Does anyone can give me the package and function that does it easily? Thanks, max
Hi Max,
library(raster); use with function: writeRaster("raster object",
"name", format="ascii"); format="raster" for *.grd files
library(rgdal); use with function: writeGDAL("rgdal object",
fname="name", drivername="AAIGrid"); use gdalDrivers() to identify
your preferred drivername for *.grd
you certainly have to change your grid object to a raster object when
using raster package.
All the best!
Carsten
Maxime Pauwels Researcher ID: http://www.researcherid.com/rid/A-1745-2009 Equipe G?n?tique& ?volution de l'adaptation aux environnements pollu?s par les m?taux lourds Laboratoire de G?n?tique et Evolution des Populations V?g?tales FRE CNRS 3268 B?timent SN2 Universit? de Lille, USTL-Lille1 http://gepv.univ-lille1.fr Tel : +33 3 20 33 62 38 Fax : +33 3 20 43 69 79