parse a model into an xyz dataframe from basename, considers both g## and g##.hdf files
Usage
parse_model_to_xyz(
geom_path,
units,
proj_string,
in_epoch_override = as.integer(as.POSIXct(Sys.time())),
out_epoch_override = as.integer(as.POSIXct(Sys.time())),
vdat_trans = FALSE,
quiet = FALSE,
is_verbose = TRUE
)
Arguments
- geom_path
path to the base model
- units
units found in the project, "English Units" or "SI Units"
- proj_string
PARAM_DESCRIPTION
- in_epoch_override
PARAM_DESCRIPTION, Default: as.integer(as.POSIXct(Sys.time()))
- out_epoch_override
PARAM_DESCRIPTION, Default: as.integer(as.POSIXct(Sys.time()))
- vdat_trans
PARAM_DESCRIPTION, Default: FALSE
- quiet
flag to determine whether print statements are suppressed, TRUE to suppress messages and FALSE to show them, Default: FALSE
- is_verbose
flag to determine whether internal print statements (i.e. cross section parsing, vdat trans, file info) are suppressed, TRUE to show these messages and FALSE to suppress them, Default: TRUE
Examples
if (FALSE) { # \dontrun{
if(interactive()){
#EXAMPLE1
# g_path <- "./inst/extdata/sample_ras/FEMA-R6-BLE-sample-dataset/12090301/12090301_models/Model/Alum Creek-Colorado River/ALUM 006/ALUM 006.g01"
g_path <- fs::path_package("extdata/shapes.fgb", package = "mypkg")
pts <- parse_model_to_xyz(geom_path = g_path,units = "English Units",proj_string = "EPSG:2277",quiet = FALSE)
g_path <- "./inst/extdata/sample_ras/ras2fim-sample-dataset/input_iowa/10170204000897/Hydraulic_Models/Simulations/10170204000897.g01"
pts <- parse_model_to_xyz(geom_path = g_path,units = "SI Units",proj_string = "EPSG:26915",quiet = FALSE)
select_model_index <- 120
target_model <- ras_catalog[select_model_index,]
pts <- parse_model_to_xyz(geom_path = file.path(ras_dbase,"models",target_model$final_name_key,glue::glue("{target_model$model_name}.{target_model$g_file}"),fsep = .Platform$file.sep),
units = target_model$units,
proj_string = target_model$crs,
quiet = FALSE,is_verbose = TRUE)
}
} # }