mosaicDEMs: Create a DEM mosaic from a direcory of DEM's

Description Usage Arguments Details Value See Also Examples

Description

A helper function to create the large-extent DEM file required by the MSScvm function.

Usage

1
mosaicDEMs(dir, projRef, srcNodata = NA, dstNodata = -32768)

Arguments

dir

directory name (character). Full path to a directory containing digital elevation model (DEM) files to be mosaiced.

projRef

filename (character). Full path to an image file produced by the MSSunpack function to be used as the projection reference.

srcNodata

numeric. Specify the background value of the DEM files in the directory. If there is no background value, use NA (default) .

dstNodata

numeric. Specify the value to represent background pixels in the mosaic DEM. -32768 is the default.

Details

The provided directory path should only contain decompressed digital elevation files from the same source (SRTM, NED, GTOPO, etc). The function will search the directory and include all files found in the mosaic. It is important that each file have the same background value and that it is correctly assigned to the 'srcNodata' parameter, if not, intersection between DEMs could have unexpected results. Each individual DEM file will be adjusted to match the projection and pixel resolution of the 'proRef' image. Then they will be merged using the mean value of intersecting pixels.

Value

A GeoTIFF raster file representing the union of all individual DEM files found in the provided directory path. The mosaic file will be written to the provided directory as "dem_mosaic.tif".

See Also

reprojectDEM

Examples

1
2
3
4
5
6
7
## Not run: 

mosaicDEMs(dir = "C:/mss/dems",
           projRef = "C:/mss/LM10360321973191AAA04/LM10360321973191AAA04_dn.tif",
           srcNodata = -9999, dstNodata= -32768)

## End(Not run)

jdbcode/MSScvm documentation built on May 19, 2019, 8:24 a.m.