Simplify Vector Coordinate Data
Avoiding visual clutter in composing maps is an essential part of cartographic presentation. In cartography, this is described as map generalization, which involves coordinating many techniques, both manual and automated. Limiting the number of points in vector geodata is an important part of generalizing maps, and is especially useful for conditioning cartographic data, plotting maps at small scales, and creating versions of geodata for use at small scales.
An easy, but naive, approach to point reduction is to discard every
nth element in each coordinate vector (simple
decimation). However, this can result in poor representations of the original shapes.
The toolbox provides a function to eliminate insignificant geometric detail in linear
and polygonal objects, while still maintaining accurate representations of their shapes.
reducem function implements a powerful line simplification
algorithm (known as Douglas-Peucker) that intelligently selects and deletes visually
reducem function takes latitude and longitude vectors, plus
an optional linear tolerance parameter as arguments, and outputs reduced (simplified)
versions of the vectors, in which deviations perpendicular to local "trend lines" in the
vectors are all greater than the tolerance criterion. Endpoints of vectors are
preserved. Optional outputs are an error measure and the tolerance value used (it is
computed when you do not supply a value).
Simplified line data might not always be appropriate for display. If all or most intermediate points in a feature are deleted, then lines that appear straight in one projection can be incorrectly displayed as straight lines in others, and separate lines can be caused to intersect. In addition, when you are reducing data over large world regions, the effective degree of reduction near the poles are less than that achieved near the equator, due to the fact that the algorithm treats geographic coordinates as if they were planar.