Learn R Programming

ParallelDSM (version 0.3.7)

MergingTiles: A function that combines the results of parallel cutting into a single file

Description

A function that combines the results of parallel cutting into a single file

Usage

MergingTiles(df_dem, f.i.d, f.iblock, n.block, f.o.d, f.suffix)

Value

1

Arguments

df_dem

: The predicted source file before merging

f.i.d

: Enter the absolute path to the file

f.iblock

: The filename prefix of the resulting result

n.block

: The number of blocks cut is calculated in parallel

f.o.d

: The absolute output path of the file

f.suffix

: The suffix for the output of the file

Examples

Run this code
# \donttest{
# you must have a file, which is name "myres"
# Merging files, for example:
# f.input.directory <- c("e:/test/")
# f.input.iblock <- c("sics030_")
# n.block <- 100
# f.output.directory <- c("e:/test/myoutput")
# f.output.suffix <- c("sics030_together.tif")
# Naming rules: file.name.directory + file.name.iblock + ".tif"

rmap_dem <- raster("E:/test/dem.tif")
spdf_dem <- as(rmap_dem,"SpatialPointsDataFrame")
df_dem <- as.data.frame(spdf_dem)

# mergeing results together
n.block <- 100
f.i.d <- c("E:/test/mapping/")
f.o.d <- c("E:/test/mapping_merge/")
f.iblock <- c("mlr.ak05.")
f.suffix <- c("mlr.ak05.tif")
MergingTiles(df_dem, f.i.d, f.iblock, n.block, f.o.d, f.suffix)
# }

Run the code above in your browser using DataLab