[R-sig-Geo] how to write ESRI grids from R

Bacou, Melanie mel at mbacou.com
Mon Jul 25 10:40:18 CEST 2016


You can use:
writeGDAL(x, drivername="AAIGrid", ...)
or simply use a ".asc" file extention:
writeRaster(x, filename="fileName.asc", ...)

See raster::WriteFormats().

--Mel.


On 7/24/2016 11:41 AM, Pascal Title wrote:
> I am trying to convert some rasters to the formats in which the WorldClim
> dataset is provided: generic grids and ESRI grids.
> The generic grids are provided as 2 files, a .bil and .hdr.
> The ESRI grids are provided as a directory of .adf files and a info
> directory.
>
> I find that writing a raster with writeRaster() from the raster package
> with format = 'EHdr' generates 4 files, with extensions ".aux.xml", ".hdr",
> ".prj" and ".bil". This seems to be the "generic grid" format, with some
> additional files.
>
> However, I can't find the ESRI grid format in R. Is the reason that it is a
> proprietary format and I need to go through ArcGIS, or is it possible to
> use this format in R?
>
> Thanks!
> -Pascal
>



More information about the R-sig-Geo mailing list