Description Usage Arguments Value Examples
This takes a raster of the class SpatialGridDataFrame and converts it into jpg chips of the specified dimensions and overlap. Band color order can be specified with arguments
1 2 3 4 |
imageName |
Name of Tif to be chipped. |
flightName |
name of flight to be chipped |
red |
Dimension number for red band |
green |
Dimension number for green band |
blue |
Dimension number for blue band |
dim |
Size of output jpg chip |
overlap |
number of pixels to overlap the chips |
outputFolder |
location that new chips are copied |
outputJPG |
Logical. Export jpg? |
returnData |
Logical. return jpgs? For future use when chips not saved. |
exportChipKey |
Logical, export the chipkey csv or not. |
Optionally exports a list of images that were created.
Chips jpg files into the outputFolder directory.
chipList csv file listing the filenames and coordinates for the exported jpgs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
###List of Tiffs to Crop:-----------------------------------------------
files <- list.files("G:/GoogleImagery/Purchase2/Mosaics",recursive=TRUE,pattern="*.tif",full.names = TRUE)
files <- files[grep(pattern = "crescentcity2015",x = files)]
###Crop one tiff:--------------------------------------------
retile(imageName = files[1],dim=299,overlap=60,outputFolder="Chips")
###Crop a list of tiffs:-------------------------------------------
setwd("G:/GoogleImagery/Purchase2")
sapply(files,FUN=retile,outputFolder="Chips",flightName = "ca_crescentcity_20150715_rgb")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.