![]() Chapter Contents |
![]() Previous |
![]() Next |
| The GREMOVE Procedure |
| Procedure features: |
| |||||
| Other features: |
| |||||
| Sample library member: | GR25N02 |
This example processes the MAPS.AFRICA map data set, supplied with SAS/GRAPH, to produce a new map data set that contains no internal boundaries. This is done by adding a new variable, REGION, to the map data set and setting it equal to 1. Unit areas from the input map data set that have the same BY-variable value are combined into one unit area in the output map data set. The MAPS.AFRICA Data Set shows the variables present in the original map data set:
MAPS.AFRICA Data Set
OBS ID SEGMENT X Y
1 125 1 0.57679 1.43730
2 125 1 0.57668 1.43467
3 125 1 0.58515 1.42363
.
.
.
3462 990 1 1.04249 0.50398
3463 990 1 1.04184 0.50713
3464 990 1 1.04286 0.50841 |
Map before Removing Borders (GR25N02(a)) shows the map before processing:
Map before Removing Borders (GR25N02(a))
The new REFLIB.AFRICA map data set is created with a new variable, REGION. The REFLIB.AFRICA Data Set shows the variables that are present in the new map data set created by the GREMOVE procedure:
REFLIB.AFRICA Data Set
OBS X Y SEGMENT REGION
1 0.24826 1.02167 1 1
2 0.25707 1.02714 1 1
3 0.26553 1.03752 1 1
.
.
.
982 1.19071 1.30043 3 1
983 1.18675 1.30842 3 1
984 1.18518 1.32822 3 1 |
Map after Removing Borders (GR25N02(b)) shows the new map after PROC GREMOVE has removed all of the interior boundaries:
Map after Removing Borders (GR25N02(b))
| | libname reflib 'SAS-data-library';
libname maps 'SAS-maps-library';
goptions reset=global gunit=pct border cback=white
colors=(black blue green red)
ftext=swiss htitle=6 htext=3; |
| | data newaf; set maps.africa; region=1; run; |
| | proc gremove data=newaf out=reflib.africa; by region; id id; run; |
| | title 'Africa with Boundaries'; footnote j=r 'GR25N02(a) '; |
| | pattern value=mempty r=50 color=blue; |
| | proc gmap map=maps.africa data=maps.africa all; id id; choro id / nolegend; run; |
| | title 'Africa without Boundaries'; footnote j=r 'GR25N02(b) '; |
| | proc gmap data=reflib.africa map=reflib.africa; id region; choro region / nolegend; run; quit; |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.