getFileExtent: Get File Extent

View source: R/fun_mastermap.R

getFileExtentR Documentation

Get File Extent

Description

Not intended to be called directly by user. Queries a list of files on disk and extracts only their spatial extent (without reading the file in memory.) Used to associate file names to OS 10km grid tiles for faster Mastermap loading in prepare_basemap().

Usage

getFileExtent(fileList, layer)

Arguments

fileList

a list of file paths. For shapefiles, should be the dsn path (folder); for other spatial formats, should be the full path including extension.

layer

the layer name. For shapefiles, this correspond to the file name and should be a list of same length as fileList. For other spatial formats, layer names can be obtained in a GIS system or by using st_layers() and should be a character string.

Value

A list of rectangular polygons corresponding to the extent of each file in fileList.


ecoservR/ecoserv_tool documentation built on April 5, 2025, 1:49 a.m.