Mapping Toolbox    
reducem

Reduce the number of points in vector data

Syntax

Description

[latout,lonout] = reducem(latin,lonin) reduces the number of points in vector map data. In this case the tolerance is computed automatically.

[latout,lonout] = reducem(latin,lonin,tol) uses the provided tolerance. The units of the tolerance are degrees of arc on the surface of a sphere.

[latout,lonout,cerr] = reducem(...) in addition returns a measure of the error introduced by the simplification. The output cerr is the difference in the arc length of the original and reduced data, normalized by the original length.

[latout,lonout,cerr,tol] = reducem(...) also returns the tolerance used in the reduction, which is useful when the tolerance is computed automatically.

Examples

Compare the original and reduced outlines of the District of Columbia from the usahi atlas data:

Remarks

Vector data is reduced using the Douglas-Peucker line simplification algorithm. This method recursively subdivides a polygon until a run of points can be replaced by a straight line segment, with no point in that run deviating from the straight line by more than the tolerance. The distances used to decide on which runs of points to eliminate are computed in a Plate Carree projection.

Reduced geographic data may not always be appropriate for display. If all intermediate points in a dataset are reduced, then lines appearing straight in one projection will be incorrectly displayed as straight lines in others.

See Also
interpm
Interpolates vector data to a specified data separation
resizem
Resizes a matrix map


  reckon resizem