db.write.format {RGeostats} | 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=".", colors=rg.colors(), colorscale.file=NA, na.value=-99999999999)
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 'RGeostats.<ext>' where <ext> is the corresponding mode extension. |
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. Only used for IRAP and BMP. |
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. Only used for IRAP and BMP. |
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. Only used for BMP. |
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. Only used for BMP. |
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, PNG and GEOTIFF. |
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, PNG and GEOTIFF. |
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. 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. Only used for BMP. |
red |
When ncolor>0, this array contains the indices for the red channel (between 0 and 255) for each color. Dimension should be ncolor. Only used for BMP. |
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. Only used for BMP. |
mask_red,mask_green,mask_blue |
Definition of the 'mask' color used for the masked sample. Only used for BMP. |
ffff_red,ffff_green,ffff_blue |
Definition of the 'ffff' color used for the undefined sample. Only used for BMP. |
low_red,low_green,low_blue |
Definition of the 'lower' color used for the a sample lower than 'valmin' (if flag.low=1) Only used for BMP. |
high_red,high_green,high_blue |
Definition of the 'upper' color used for the a sample larger than 'valmax' (if flag.high=1) Only used for BMP. |
sep,dec |
Definition of the parameters used by function write.table in the case of mode=CSV |
colors |
Colorscale to be used for interpolating values between valmin and valmax.
For GEOTIFF, if a colorscale text file is provided with colors.file,
it is used in priority (see |
colorscale.file |
Colorscale text file generated using |
na.value |
NA value used for generating Geotiff image. This value must be identical to
the one used for the colorscale file generated by |
In VTK, we can distord the coordinates by using the following statement: set.keypair("VTK_Fact_X",1) set.keypair("VTK_Fact_Y",1) set.keypair("VTK_Fact_Z",1)
An ASCII file corresponding to the selected format.