GPROJECT Procedure
Example 2: Emphasizing Map Areas
Features: |
PROC GPROJECT options POLELAT=, POLELONG=, and PROJECT=
|
Sample library member: |
GPJEMPHS |
This example uses
the gnomonic projection method to create a map in which the east coast
of the United States appears disproportionately large compared to
the west coast.
Program
goptions reset=all border;
data us48;
set maps.states;
if state ne 2 and state ne 15 and state ne 72;
if density<4;
run;
proc gproject data=us48
out=skew
project=gnomon
polelong=160
polelat=45;
id state;
run;
title "United States Map";
footnote j=r "GPJEMPHS ";
pattern value=mempty color=blue;
proc gmap map=skew data=skew all;
id state;
choro state / nolegend levels=1;
run;
quit;
Program Description
Set the graphics environment.
goptions reset=all border;
Create a reduced continental U.S. map data set and remove
Alaska, Hawaii, and Puerto Rico.
data us48;
set maps.states;
if state ne 2 and state ne 15 and state ne 72;
if density<4;
run;
Project the map onto a plane centered in the Pacific. The PROJECT= option specifies the projection method
for the map data set. The POLELONG= and POLELAT= option specify a
projection pole for the gnomonic projection. In this example, the
pole is positioned in the Pacific Ocean.
proc gproject data=us48
out=skew
project=gnomon
polelong=160
polelat=45;
id state;
run;
Define the title and footnote for the map.
title "United States Map";
footnote j=r "GPJEMPHS ";
Define the pattern characteristics.
pattern value=mempty color=blue;
proc gmap map=skew data=skew all;
id state;
choro state / nolegend levels=1;
run;
quit;
Copyright © SAS Institute Inc. All rights reserved.