Chapter Contents |
Previous |
Next |

The GREDUCE Procedure |

Specifying Density Levels |

- the maximum number of observations for each DENSITY
level
- the minimum distance that an intermediate point
must lie from a line between two end points to be included in the level.

If you do not explicitly specify criteria, the procedure computes and uses default values.

Specify the maximum number of observations per density level using N**n**= in the PROC GREDUCE statement, and specify the minimum point distance
using E**n**= . You must have knowledge of the X and Y variable
values in the particular input map data set to determine appropriate values
for E**n**=. See En= and Nn= for
details.

Points in Data Set before Reduction
illustrates how to use the minimum distance parameter to determine which points
belong in a particular density level. At density level **n**, only
point C lies at a distance greater than the E**n**= value (70) from
a line between points A and B. Thus, after reduction only point C remains
between points A and B at density level **n**, and the resulting
reduced boundary is shown in Points in Data Set at Density n after Reduction. See Douglas and Peucker (1973) for
details of the algorithm used.

*Points in Data Set before Reduction*

*Points in Data Set at Density n after Reduction*

If this distance function is not suitable for the coordinate system in your input map data set, transform the X and Y values to an appropriate coordinate system before using GREDUCE. An example of inappropriate coordinates is latitude and longitude values around one of the poles. In this case, the data values should be projected before they are reduced. See The GPROJECT Procedure for more information on map projection.

If you specify both N**n**= and E**n**=
values for a density level, GREDUCE attempts to satisfy both criteria. However,
the number of points for any level is never reduced below the number of points
in density level 0. If you specify a combination of N**n**= or E**n**= values such that the resulting DENSITY values are not in order of
increasing density, a note is printed in the SAS log, and the DENSITY values
are calculated in increasing order of density.

Subsetting a Map Data Set |

data smallmap; set map; if density <= 2; run;

Alternatively, you can use WHERE= in the PROC GMAP statement:

proc gmap map=map(where=(density<=2)) data=response;

**Note:** GREDUCE does not
reduce the size of the output map data set compared to the input map data
set. By default, the output map data set from PROC GREDUCE will be larger
than the input map data set because it contains all of the variables and observations
from the original data set, with the addition of the DENSITY variable if it
was not present in the original data set. If the input map data set already
had a DENSITY variable, the output map data set will be the same size as the
input map data set.

Chapter Contents |
Previous |
Next |
Top of Page |

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.