[R-sig-Geo] export to .asc or .grd files

Maxime Pauwels Maxime.Pauwels at univ-lille1.fr
Wed Dec 22 15:34:07 CET 2010


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



More information about the R-sig-Geo mailing list