Project

General

Profile

« Previous | Next » 

Revision 41b62b4e

Added by Benoit Parmentier over 8 years ago

mosaicing script function, fixing output filename and output directory

View differences:

climate/research/oregon/interpolation/global_run_scalingup_mosaicing_function.R
4 4
#Different options to explore mosaicing are tested. This script only contains functions.
5 5
#AUTHOR: Benoit Parmentier 
6 6
#CREATED ON: 04/14/2015  
7
#MODIFIED ON: 12/19/2015            
7
#MODIFIED ON: 04/06/2016            
8 8
#Version: 2
9 9
#PROJECT: Environmental Layers project     
10 10
#COMMENTS: first commit of function script to test mosaicing using 1500x4500km and other tiles
......
153 153
  
154 154
    extension_str <- extension(inFilename)
155 155
    raster_name_tmp <- gsub(extension_str,"",basename(inFilename))
156
    outFilename <- file.path(out_dir,paste(raster_name_tmp,"_",metric_name,"_",out_suffix,file_format,sep="")) #for use in function later...
156
    outFilename <- file.path(out_dir_str,paste(raster_name_tmp,"_",metric_name,"_",out_suffix,file_format,sep="")) #for use in function later...
157 157
  
158 158
    writeRaster(r1, NAflag=NA_flag_val,filename=outFilename,overwrite=TRUE)  
159 159
    #list_raster_name[[j]] <- outFilename
......
202 202

  
203 203
  #use mclapply  
204 204
  #list_raster_name <- vector("list",length=length(lf))
205
  list_param_raster_df_centroids <- list(df_centroids,metric_name,NA_flag_val,file_format,out_dir,out_suffix)
205
  list_param_raster_df_centroids <- list(df_centroids,metric_name,NA_flag_val,file_format,out_dir_str,out_suffix)
206 206
  names(list_param_raster_df_centroids) <- c("df_centroids","metric_name","NA_flag_val","file_format","out_dir","out_suffix")
207 207

  
208 208
  #undebug(create_raster_df_centroids_fun)

Also available in: Unified diff