flow_mapper() and form_mapper() each provide output information per cell of a dem file. This function takes the fill dem from flow_mapper() as well as the form, length, and weti dem files from form_mapper() and merges them together into a complete dem file with all information.

merge_flow_form(folder, format = "rds")

Arguments

folder

Character. Folder with previous LITAP runs (i.e. where output of flow_mapper() etc. are)

format

Character. Output format (rds or csv) that files are saved as.

Examples

merge_flow_form,Combine flow and form output dems,Combine flow and form output dems — merge_flow_form,Source: R/utils_combine_dems.R,merge_flow_form.Rd,character(0),merge_flow_form,character(0),list(title = "Description", contents = "

flow_mapper() and form_mapper() each provide output information per cell\nof a dem file. This function takes the fill dem from flow_mapper() as well\nas the form, length, and weti dem files from form_mapper() and merges them\ntogether into a complete dem file with all information.

"),list(description = "flow_mapper() and form_mapper() each provide output information per cell\nof a dem file. This function takes the fill dem from flow_mapper() as well\nas the form, length, and weti dem files from form_mapper() and merges them\ntogether into a complete dem file with all information."),merge_flow_form(folder, format = "rds"),list(list(name = "folder", description = "

Character. Folder with previous LITAP runs (i.e. where output\nof flow_mapper() etc. are)

"), list(name = "format", description = "

Character. Output format (rds or csv) that files are saved as.

")),TRUE,
# First need to run flow_mapper() flow_mapper(file = system.file("extdata", "testELEV.dbf", package = "LITAP"), out_folder = "./testELEV/", nrow = 90, ncol = 90)
#> CALCULATING DIRECTIONS
#> CALCULATING WATERSHEDS
#> REMOVING INITIAL PITS
#> CALCULATING POND (GLOBAL) WATERSHEDS
#> CALCULATING FILL PATTERNS
#> INVERTING DEM
#> CALCULATING INVERTED DIRECTIONS
#> CALCULATING INVERTED WATERSHEDS
#> REMOVING INVERTED INITIAL PITS
#> SAVING OUTPUT
#> CREATING REPORT
#> Run took: 0.17 min
# Then run form_mapper() form_mapper(folder = "./testELEV/", grid = 5)
#> SETUP
#> CALCULATING FORM
#> CALCULATING WETNESS INDICES
#> CALCULATING RELIEF DERIVITIVES
#> CALCULATING SLOPE LENGTH
#> Run took: 0.1 min
# Now merge together merge_flow_form(folder = "./testELEV")
#> # A tibble: 8,100 x 106 #> shedno seqno_buffer ridge elev drec_buffer seqno_shed drec_shed upslope #> <dbl> <int> <lgl> <dbl> <int> <int> <int> <dbl> #> 1 11 94 TRUE 680. 95 1 2 1 #> 2 11 95 TRUE 680. 96 2 3 2 #> 3 11 96 FALSE 680. 97 3 4 3 #> 4 11 97 FALSE 680. 98 4 5 4 #> 5 11 98 FALSE 680. 99 5 6 5 #> 6 11 99 FALSE 680. 100 6 7 6 #> 7 11 100 FALSE 679. 101 7 8 7 #> 8 11 101 FALSE 679. 102 8 9 8 #> 9 11 102 FALSE 679. 103 9 10 9 #> 10 11 103 FALSE 679. 104 10 11 10 #> # … with 8,090 more rows, and 98 more variables: initial_shed <dbl>, row <dbl>, #> # col <dbl>, missing <lgl>, buffer <lgl>, elev_orig <dbl>, edge_map <lgl>, #> # ddir <dbl>, flatcell <lgl>, vol2fl <dbl>, mm2fl <dbl>, parea <int>, #> # elev_diff <dbl>, local_shed <dbl>, local_ddir <dbl>, local_elev_diff <dbl>, #> # pond_shed <dbl>, fill_shed <dbl>, sgre <dbl>, sgr <dbl>, sgcn <dbl>, #> # sgc <dbl>, scr <dbl>, scc <dbl>, hill_r_dir <dbl>, hill_c_dir <dbl>, #> # hill_r_n <dbl>, hill_r_cell <int>, hill_c_n <dbl>, hill_c_cell <int>, #> # seqno <int>, drec <int>, slope_pct <dbl>, slope_deg <dbl>, aspect <dbl>, #> # prof <dbl>, plan <dbl>, str_row <dbl>, str_col <dbl>, str_elev <dbl>, #> # z2st <dbl>, n2st <dbl>, pit_seqno <int>, pit_row <dbl>, pit_col <dbl>, #> # pit_elev <dbl>, z2pit <dbl>, n2pit <dbl>, cr_row <dbl>, cr_col <dbl>, #> # cr_elev <dbl>, z2cr <dbl>, n2cr <dbl>, peak_seqno <int>, peak_row <dbl>, #> # peak_col <dbl>, peak_elev <dbl>, z2peak <dbl>, n2peak <dbl>, #> # min_elev <dbl>, max_elev <dbl>, elev_range <dbl>, max_elev_shed <dbl>, #> # zpit2peak <dbl>, zcr2st <dbl>, zcr2pit <dbl>, z2top <dbl>, ztop2pit <dbl>, #> # ncr2st <dbl>, pctz2top <dbl>, pctz2st <dbl>, pctz2pit <dbl>, pctn2st <dbl>, #> # pmin2max <dbl>, l2pit <dbl>, l2peak <dbl>, l2str <dbl>, l2div <dbl>, #> # lpit2peak <dbl>, lstr2div <dbl>, ppit2peakl <dbl>, pstr2divl <dbl>, #> # cell_t <dbl>, count_d <dbl>, count_o <dbl>, elev_sum <dbl>, qarea1 <dbl>, #> # qarea2 <dbl>, qc1 <dbl>, qc2 <dbl>, in_t <dbl>, out_t <int>, #> # sumtanbl <dbl>, qweti1 <dbl>, qweti2 <dbl>, lnqarea1 <dbl>, lnqarea2 <dbl>, #> # new_asp <dbl>
# Clean up (remove all output) unlink("./testELEV/", recursive = TRUE)
,list(),2021,list(name = "LITAP", version = "0.4.1.9000", authors = "Steffi LaZerte, Sheng Li, Agriculture and Agri-Food Canada"),list(destination = "dev", mode = "release", version_label = "default", version_tooltip = "Released version", in_dev = FALSE),list(root = "../", title = "LITAP"),list(),list(type = "default", left = "
  • \n \n \n \n \n
  • \n
  • \n Reference\n
  • \n
  • \n Articles\n
  • \n
  • \n News\n
  • ", right = "
  • \n \n \n \n \n
  • "),list(.present = TRUE),list(version = "1.6.1"),FALSE