Batch transform spatial files. Function finds all files with specified extension pattern within input directory and sets crs if does not already exist. Files are projected to new crs and written to output directory with specified extension and file format (allows any extension recognised by sf::st_write function).
ps_batch_transform(
in_dir,
out_dir,
recursive = T,
in_pattern = "[.]shp$",
out_pattern = ".sqlite",
in_crs = NULL,
out_crs = NULL
)
A string of the path to the directory containing spatial files.
A string of the path to the directory that output files will be saved to.
A logical specifying whether to search directory recursively.
A string of the pattern to use when searching for input files.
A string of the extension specifying which file format output files will be saved to.
An integer of the EPSG that files are currently in (only set if crs not currently already present).
An integer of the EPSG that files will be transformed to.
Files with specified crs and extension written to output directory.