Mapping Toolbox    
maptrims

Trim surface regular matrix map data to a specified region

Syntax

Description

This command selects a portion of a larger matrix map defined by a latitude-longitude quadrangle.

[submap,sublegend] = maptrims(map,maplegend,latlim,lonlim) returns the subset of the input regular matrix map between the latitude and longitude limits, in degrees, defined by the two-element vectors latlim and lonlim. maplegend is the map legend vector of the input matrix map; sublegend is the map legend vector of the output matrix map.

[submap,sublegend] = maptrims(map,maplegend,latlim,lonlim,scale) is a means of further reducing the size of the output matrix. The cells-per-degree scale of the original matrix is given by the first element of maplegend. The desired cells-per-degree scale in the output map is given by scale, which must equally divide maplegend(1). For example, if maplegend(1) were 20 (cells per degree), then scale could be 1, 2, 4, 5, 10 or 20.

The reduced matrix is created using resizem with a 'nearest' interpolation method.

Examples

The upper left corner of the map may differ slightly from that of the requested region. maptrims uses the corner coordinates of the first cell inside the limits.

See Also
map legend vector
Data structure for describing regular matrix maps
maptriml
Trim line vector map data to specified region
maptrimp
Trim patch map data to specified region
resizem
Resize a matrix map


  maptrimp maskm