Chapter Contents

Previous

Next
The GREMOVE Procedure

Concepts

The GREMOVE procedure processes the input map data set to remove internal boundaries and creates a new map data set. The PROC GREMOVE statement identifies the input and output map data sets. The ID statement identifies the variable or variables in the input map data set that define the current unit areas. The BY statement identifies the variable or variables in the input map data set that define the new unit areas.


About the Input Map Data Set

The input map data set must be in map data set format (see About Map Data Sets) and it must contain these variables:

It may also contain the variable SEGMENT, which is used to distinguish non-conterminous segments of the same unit areas. Other variables may exist in the input map data set, but they do not affect the GREMOVE procedure and they will not be carried into the output map data set.


About the Output Map Data Set

The output map data set contains the newly defined unit areas. These new unit areas are created by removing all interior line segments from the original unit areas. All variables in the input map data set except X, Y, SEGMENT, and the variables listed in the BY statement are omitted from the output map data set.

The output map data set may contain missing X, Y coordinates to construct any polygons that have enclosed boundaries (like lakes or combined regions that have one or more hollow interior regions).

The SEGMENT variable in the output map data set is ordered according to the size of the bounding box around the polygon that it describes. A SEGMENT value of 1 describes the polygon whose bounding box is the largest in the unit area and so on. This information is useful for removing small polygons that clutter up maps.

All current unit areas with common BY-variable value(s) are combined into a single unit area in the output map data set. The new unit area contains


About Unmatched Area Boundaries

If you are using map data sets in which area boundaries do not match precisely (for example, if the boundaries were digitized with a different set of points), PROC GREMOVE will not be able to identify common boundaries properly, resulting in abnormalities in your output data set.

If the points in the area boundaries match up except for precision differences, before using PROC GREMOVE round each X and Y value in your map data set accordingly, using the DATA step function ROUND. See SAS Language Reference: Dictionary for information on the ROUND function.

For example, if you have a map data set named APPROX in which the horizontal and vertical coordinate values for interior boundaries of unit areas are exactly equal only to three decimal places, this DATA step creates a new map data set, EXACT, that is better suited for use with the GREMOVE procedure:

data exact;
   set approx;
   if x ne . then x=round(x,.001);
   if y ne . then y=round(y,.001);
run;


Chapter Contents

Previous

Next

Top of Page

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