: [rbo, rio] = rasterclip (rbi, rii, clpbox)

Clip a georaster with a rectangle and return adapted bands and info structs.

rasterclip is useful for extracting a part of a raster map to enable e.g., faster drawing rbi and rii are output structs from rasterread.m clpbox is a 2x2 matrix containing [Xmin, Ymin; Xmax, Ymax] of the rectangle.

Output structs rbo and rio contain adapted bbox, data, Width, Height and GeoTransformation fields. All other fields are copied verbatim, except fields FileSize, FileName and FileModDate which are all left empty.

See also: rasterread,rasterdraw.

Package: mapping