db.point2cell {RGeostats} | R Documentation |
Calculate Surface and Volume of the Voronoi of a set of isolated points
db.point2cell(db, dbgrid, option=0, flag.size=FALSE, name.time=NA, name.size=NA, name.angle=NA, name.scaleu=NA, name.scalev=NA, name.scalew=NA, flag.plot = TRUE, flag.grid = TRUE, radix = "Point2Cell", modify.target = db.locmod(), ...)
db |
The |
dbgrid |
The |
option |
Type of structuring element or connectivity:
|
flag.size |
This argument describes the border coding in the 'dbgrid'.
|
name.time |
Name of the variable which contains the Time shift used for Johnson-Mehl algorithm. |
name.size |
Name of the variable which contains the thickness of the Voronoi polygon |
name.angle |
Name of the variable which contains the rotation angle (around OZ) for defining the anisotropy on distances. If absent, no rotation is performed. |
name.scaleu |
Name of the variable which contains the scaling factor by which the distance along the first axis (after possible rotation) must be divided. If not defined, no distorsion will be applied. If equal to 1, no distance distorsion in the first direction (after rotation) is applied. If equal to 0, this component is not used for distance calculation. |
name.scalev |
Name of the variable which contains the scaling factor by which the distance along the second axis (after possible rotation) must be divided. If not defined, no distorsion will be applied. If equal to 1, no distance distorsion in the second direction (after rotation) is applied. If equal to 0, this component is not used for distance calculation. |
name.scalew |
Name of the variable which contains the scaling factor by which the distance along the third axis (after possible rotation) must be divided. If not defined, no distorsion will be applied. If equal to 1, no distance distorsion in the third direction (after rotation) is applied. If equal to 0, this component is not used for distance calculation. |
flag.plot |
When TRUE, the result of the Voronoi is displayed with the set of isolated points overlaid. |
flag.grid |
Defines the resulting argument: |
radix |
Radix of the name given to the output variable in any resulting file. |
modify.target |
Decides whether or not the newly created variables will have their
locator defined or not. For more information, see |
... |
Arguments passed to db.plot function. |
Use the solution: set_keypair("PTB_Flag_Index",1) to assign the Index of the closest sample to the grid cell (instead of the value of the attribute of the closest sample)
The returned structure depends upon argument 'flag.grid'.
TRUE The resulting argument is the Db containing the discretized grid containing the new variable corresponding to the Voronoi edge. Each pixel is set to 0 if inside the cell and to 1 if on the edge.
FALSE The resulting argument is the Db containing containing three new variables:
The Volume of the Voronoi cells
The Perimeter of the Voronoi cells
The Code equal to 2 if the Voronoi cell intersects the edge of the Discretized Grid and to 1 otherwise