db.write.format {RGeoS} | R Documentation |
Dump the contents of a Db into a specific file
db.write.format(db,mode="csv",file=NA,name=NA,must.noproj=TRUE, nsamplex=1, nsampley=1, nmult=1, flag.low=0, flag.high=1, valmin=NA, valmax=NA, append=FALSE, ncolor=NA, red=NA, green=NA, blue=NA, mask_red= 0, mask_green= 0, mask_blue= 0, ffff_red=232, ffff_green=232, ffff_blue= 0, low_red =255, low_green =255, low_blue =255, high_red=255, high_green= 0, high_blue= 0, sep=",",dec=".")
db |
The |
mode |
Format used for the dump:
|
file |
Name of the file where the contents of the Db will be dumped out. If not defined, the file name is generated automatically as RGeoS."mode". |
name |
Name of the variable(s) to be dumped. If CSV format is used, several variables can be specified: if the argument name is not provided, all the variables are dumped. For all other formats, only one variable name is authorized. |
must.noproj |
When TRUE, the data contained in the Db are NOT translated before they are printed in the auxiliary file |
nsamplex |
Sampling ratio along the X axis. When equal to 1, all samples are displayed. When equal to 2, one sample out of two is represented. |
nsampley |
Sampling ratio along the Y axis. When equal to 1, all samples are displayed. When equal to 2, one sample out of two is represented. |
nmult |
Magnification factor used in the BMP output. |
flag.low |
When 1, a grid cell where the value is smaller than 'valmin' is represented using the 'lower' color. Otherwise, it is represented with the first color of the color scale. |
flag.high |
When 1, a grid cell where the value is larger than 'valmax' is represented using the 'upper' color. Otherwise, it is represented with the last color of the color scale. |
valmin |
Minimum value corresponding to the first color in the color scale. If NA, this value is calculated from the represented grid values. Only used for BMP. |
valmax |
Maximum value corresponding to the last color in the color scale. If NA, this value is calculated from the represented grid values. Only used for BMP. |
append |
When the CSV format is used, and if this flag is switched ON, the contents of the current dump is concatenated to an already existing file (No error occurs if the file does not already exist). When this flag is switched OFF, the current dump replaces the previous contents of the file. |
ncolor |
Number of colors which define the color scale (used for BMP only). If not provided, a grey color scale constructed automatically with 256 levels is used. When ncolor is positive, the user should provide the array of indices for the basic three colors: red, green and blue. |
red |
When ncolor>0, this array contains the indices for the red channel (between 0 and 255) for each color. Dimension should be ncolor. |
green |
When ncolor>0, this array contains the indices for the green channel (between 0 and 255) for each color. Dimension should be ncolor. |
blue |
When ncolor>0, this array contains the indices for the blue channel (between 0 and 255) for each color. Dimension should be ncolor. |
mask_red,mask_green,mask_blue |
Definition of the 'mask' color used for the masked sample. |
ffff_red,ffff_green,ffff_blue |
Definition of the 'ffff' color used for the undefined sample. |
low_red,low_green,low_blue |
Definition of the 'lower' color used for the a sample lower than 'valmin' (if flag.low=1) |
high_red,high_green,high_blue |
Definition of the 'upper' color used for the a sample larger than 'valmax' (if flag.high=1) |
sep,dec |
Definition of the parameters used by function write.table in the case of mode=CSV |
An ASCII file corresponding to the selected format.