I'm interested in finding the unit for the obtained area size of the polygons without refererring to the externally available documentation.
Example
A suite of shapefiles is imported as follows:
tmpDir <- tempdir()
tmpFle <- tempfile(fileext = ".zip")
download.file(url = "https://borders.ukdataservice.ac.uk/ukborders/easy_download/prebuilt/shape/infuse_rgn_2011_clipped.zip",
destfile = tmpFle,
method = "wget")
unzip(zipfile = tmpFle, exdir = tmpDir)
shpsUK <- rgdal::readOGR(dsn = tmpDir,
layer = tools::file_path_sans_ext(dir(tmpDir)[3]))
Area sizes
oldScipen <- getOption("scipen")
options(scipen = 999)
format(summary(rgeos::gArea(shpsUK, byid = TRUE)),
big.mark = ",")
options(scipen = oldScipen)
which produces:
Min. 1st Qu. Median Mean 3rd Qu. Max.
" 1,573,530,067" "13,003,803,228" "15,411,419,165" "14,492,421,008" "19,085,426,561" "23,851,569,172"
Can I determine the units of the obtained figures without referring to external documentation that may be available on the sources shapefiles?