addOverviews | R Documentation |
This function creates overviews (aka pyramids) with compressed copies
of the data from a raster at multiple coarser resolutions. They are saved in
a side car file with the extension ".ovr"
appended to the original file's
full name (e.g. "dem.tif.ovr"
would contain the overviews for "dem.tif"
).
Overview are used by GIS software to display the raster file more quickly
when zoomed out. They are especially useful for large files.
addOverviews(
x,
clean = FALSE,
compression = "LZW",
method = "nearest",
overviews = c(2, 4, 8, 16, 32, 64, 128, 256),
readonly = TRUE
)
x |
The path to a TIFF or other raster file. |
clean |
Defaults to |
compression |
The style of compression used in the overviews
options are: |
method |
(character) the resampling method one of |
overviews |
Overview levels to use.
See gdaladdo |
readonly |
if TRUE |
Generally the default arguments are good but you may want to change the method
to "average"
for continuous raster files and possibly to "mode"
for
categorical files. For continuous files, especially imagery, if you are OK
with lossy compression in the overviews you may change the compression to
"JPEG"
which should result in smaller files.
addOveriews
is a convenience wrapper to the
gdaladdo utility.
addOverviews()
sets reasonable defaults, only some of which can be
overridden.
addOverviews
creates an additional ".ovr"
file alongside x
with overview information. It does not return anything.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.