List supported file types for writing RasterLayer values to disk.

When a function writes a file to disk, the file format is determined by the 'format=' argument if supplied, or else by the file extension (if the extension is known). If other cases the default format is used. The 'factory-fresh' default format is 'raster', but this can be changed using rasterOptions.

writeFormats()

Details

writeFormats returns a matrix of the file formats (the "drivers") that are supported.

Supported formats include:

File typeLong namedefault extensionMultiband support
raster'Native' raster package format.grdYes
asciiESRI Ascii.ascNo
SAGASAGA GIS.sdatNo
IDRISIIDRISI.rstNo
CDFnetCDF (requires ncdf4).ncYes
GTiffGeoTiff.tifYes
ENVIENVI .hdr Labelled.enviYes
EHdrESRI .hdr Labelled.bilYes
HFAErdas Imagine Images (.img).imgYes

Examples

writeFormats() 
#>       name        long_name         
#>  [1,] "raster"    "R-raster"        
#>  [2,] "SAGA"      "SAGA GIS"        
#>  [3,] "IDRISI"    "IDRISI"          
#>  [4,] "IDRISIold" "IDRISI (img/doc)"
#>  [5,] "BIL"       "Band by Line"    
#>  [6,] "BSQ"       "Band Sequential" 
#>  [7,] "BIP"       "Band by Pixel"   
#>  [8,] "ascii"     "Arc ASCII"       
#>  [9,] "CDF"       "NetCDF"