Learn R Programming

oce (version 0.9-17)

landsatTrim: Trim a landsat image to a lat-lon box

Description

Trim a landsat image to a lat-lon box.

Usage

landsatTrim(x, ll, ur, debug=getOption("oceDebug"))

Arguments

x
A landsat object, e.g. as read by read.landsat.
ll
A list containing longitude and latitude, for the lower-left corner of the portion of the image to retain.
ur
A list containing longitude and latitude, for the upper-right corner of the portion of the image to retain.
debug
a flag that turns on debugging. Set to 1 to get a moderate amount of debugging information, or a higher value for more debugging.

Value

  • An object of class "landsat", with data having been trimmed in some way.

Details

An error results if there is no intersection between the trimming box and the image box. Although the trimming box is specified in longitude-latitude coordinates, the actual trimming is done in UTM coordinates, because this is how Landsat image data are georeferenced.

See Also

The documentation for landsat-class explains the structure of landsat objects, and also outlines the other functions dealing with them.