This function creates a "file directory" by scanning all available raster files and extracting relevant metadata.
fdir_init(rootdir, filter = c("PK", "SMR", "LK", "TA"))
rootdir | Character string specifying the directory where the folders are stored |
---|---|
filter | Names of the folders to look for. Only folders containing the character strings specified here are included in the search. |
This function scans all folders in the root dirctory corresponding to the folders given by
folders =
. It saves this directory in the package environment, and and
can later use this info to determin which rasters to import when running the
command get_raster()
.
Currently, only files ending with "tif" are checked for extent, number of layers and resolution and other informatin.
Parent folders (subfolders of rootdir =
) are scanned non recursively for
raster data with the extention ".tif". These folders must adhere a specific structure:
TYPE_Scale_EPSG_index
TYPE
corresponds to the maptype. IN Switzerland this is typically SMR
, PK
, LK
or TA
. Must be followed by a _
Scale
defines the map scale as x in 1:1'000x. Must be followed by a _
EPSG
specifies the CRS of the containing raster data Must be followed by a _
only if name
is specified
index
Optional