Description Usage Arguments Value Examples
This function divides the input file in tiles based on user preferences. The output data will be reprojected to UTM.
1 | TilesMaker(user_file, user_aoi, diff_factor, length_factor, out_folder)
|
user_file |
A raster or sp objetct. |
user_aoi |
(optional) A sp object. Will be used to crop input data and create tiles. |
diff_factor |
Integer. Faktor after which the extent of the input file will be divided into x and y direction. |
length_factor |
Vector of two integer. Can be used instead of the diff_factor. Distance in meters of one tile n x and y direction. |
out_folder |
Character string. Path to which the output tiles and fishnet polygon should be written. |
A fishnet polygon in UTM projection.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(sp)
library(raster)
library(rgdal)
library(geosphere)
# Load sample raster file
my_raster <- raster::brick(system.file(package = "SpatialDataToolbox", "extdata", "landsat_sample.tif"))
# Apply diff_factor
x1 <- TilesMaker(user_file = my_raster, diff_factor = 5, out_folder = "./")
# Delete created folder with tiles and fishnet polygon
unlink("./Fishnet", recursive = TRUE)
# Apply length_factor
x2 <- TilesMaker(user_file = my_raster, length_factor = c(10000,10000), out_folder = "./")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.