Procedure features: |
|
Sample library member: |
GPJDEFLT
|
This example demonstrates the effect of using PROC GPROJECT
on an unprojected map data set without specifying any options. Because the
PROJECT= option is not used in the PROC GPROJECT statement, the Albers' equal-area
projection method is used by default. PROC GPROJECT supplies defaults for
the standard parallels that minimize the distortion of the projected map areas.
Map before Projection (GPJDEFLT(a))
![[Map before projection]](images/gpjdeflta.gif)
Map before Projection (GPJDEFLT(a))
illustrates the output produced by the
US48 map data set, which contains unprojected values in the X and Y variables.
The US48 Data Set shows the variables in the data set.
The US48 Data Set
US48 Data Set
OBS STATE SEGMENT DENSITY X Y
1 1 1 3 1.48221 0.56286
2 1 1 3 1.48226 0.56234
3 1 1 3 1.48304 0.56231
.
.
.
The GPROJECT procedure is used with the US48 map data
set as input to create the projected map data set, US48PROJ. The values for
X and Y in this new data set are projected (Cartesian). The US48PROJ Data Set shows the variables
in the data set.
The US48PROJ Data Set
US48PROJ Data Set
OBS X Y DENSITY STATE SEGMENT
1 0.16068 -0.073470 3 1 1
2 0.16069 -0.073993 3 1 1
3 0.16004 -0.074097 3 1 1
.
.
.
The new projected map data set, US48PROJ, is used to
create the projected map,
Map after Projection (GPJDEFLT(b)).
Map after Projection (GPJDEFLT(b))
![[Map after projection]](images/gpjdefltb.gif)
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
goptions reset=all border; |
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
data us48;
set maps.states;
if state ne 2 and state ne 15 and state ne 72;
run; |
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
title "United States Map"; |
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
pattern value=mempty color=blue; |
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
proc gmap map=us48 data=us48 all density=4;
id state;
choro state / nolegend levels=1;
run; |
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
proc gproject data=us48
out=us48proj;
id state;
run; |
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
proc gmap map=us48proj
data=us48proj all density=4;
id state;
choro state / nolegend levels=1;
run;
quit; |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.