Hello. I’m trying to expand a small map (region17) to occupy more of the gray square, so far with no success. The map appears on the gray square but not scaled-up. As intended, the map with square displays outside the borders of the big map (state2). I’m not sure if my formula for scaling up is adequate, something is happening once proc gmap is executed, or ? The coordinates are in radians with the x values negative. Previously, I was overlaying the region, not scaled up, within the borders of the state without problem but moving it outside the borders with scaling-up has been a problem. I’m using SAS 9.2. Code is below. Suggestions? thanks. Jeff
data state0;
set SASDATA1.state;
rename x=long y=lat;
run;
data state1;
length region $3.;
set state0;
region='0';
x=atan(1)/45*long;
y=atan(1)/45*lat;
run;
proc gremove data=state1 out=state2;
by region;
id stfid;
run;
data tues0;
set sasdata2.house_trial_unprj;
rename x=long y=lat;
run;
data tues17;
length region $3.;
set tues0;
region=substr(district,1,3);
if region='017';
x=atan(1)/45*long;
y=atan(1)/45*lat;
run;
data region17;
set tues17;
x=x+.063705; * moves region to center of box, not expanded;
y=y+.041363; * moves region to center of box, not expanded;
xmean=-1.33087; * xmean=-1.33087 ymean=.69232;
if x-xmean<0 then do; x=x-((abs(x-xmean))*1.05); end; *for scale-up;
if x-xmean=>0 then do; x=x+((x-xmean)*1.05); end; *for scale-up;
y=y+((y-.69232)*1.05); * for scale-up;
run;
data work.boxannotate;
length function color $ 8;
xsys='2'; ysys='2'; hsys='2';
style='msolid';
function='poly';
when='b';
color='gray88';
x=-1.343; y=.681; output;
function='polycont';
x=x+.023; y=y+0; output;
x=x+0; y=y+.023; output;
x=x-.023; y=y+0; output;
x=x+0; y=y-.023; output;
run;
goptions reset=all device=TIFFP300 gsfname=grafout gsfmode=replace rotate=portrait
hsize=4in vsize=6.5in;
pattern1 value=solid c=white;
pattern2 v=solid c=red;
filename grafout "c:\metafilesfromsas\testApril2011\test1.tif";
data combined;
set state2 region17;
run;
proc gmap
map= combined
data= combined annotate=work.boxannotate;
id region;
choro region / woutline=3 nolegend;
run;
quit;
run;
filename grafout clear;