<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: map scale-up in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/map-scale-up/m-p/60870#M2033</link>
    <description>Without your data, it is hard to understand what you are trying to do.&lt;BR /&gt;
Can you clarify and explain what you are trying to accomplish by "scaling up"?</description>
    <pubDate>Tue, 03 May 2011 12:55:46 GMT</pubDate>
    <dc:creator>Darrell_sas</dc:creator>
    <dc:date>2011-05-03T12:55:46Z</dc:date>
    <item>
      <title>map scale-up</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/map-scale-up/m-p/60869#M2032</link>
      <description>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&lt;BR /&gt;
&lt;BR /&gt;
data state0;&lt;BR /&gt;
set SASDATA1.state;&lt;BR /&gt;
rename x=long y=lat;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data state1;&lt;BR /&gt;
length region $3.;&lt;BR /&gt;
set state0;&lt;BR /&gt;
region='0';&lt;BR /&gt;
x=atan(1)/45*long;&lt;BR /&gt;
y=atan(1)/45*lat;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc gremove data=state1 out=state2;&lt;BR /&gt;
by region;&lt;BR /&gt;
id stfid;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data tues0;&lt;BR /&gt;
set sasdata2.house_trial_unprj;&lt;BR /&gt;
rename x=long y=lat;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data tues17; &lt;BR /&gt;
length region $3.;&lt;BR /&gt;
set tues0;&lt;BR /&gt;
region=substr(district,1,3);&lt;BR /&gt;
if region='017';&lt;BR /&gt;
x=atan(1)/45*long;&lt;BR /&gt;
y=atan(1)/45*lat;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data region17;&lt;BR /&gt;
set tues17;&lt;BR /&gt;
x=x+.063705;  * moves region to center of box, not expanded;&lt;BR /&gt;
y=y+.041363;   * moves region to center of box, not expanded;&lt;BR /&gt;
xmean=-1.33087;	* xmean=-1.33087 ymean=.69232;&lt;BR /&gt;
if x-xmean&amp;lt;0 then do; x=x-((abs(x-xmean))*1.05); end; *for scale-up;&lt;BR /&gt;
if x-xmean=&amp;gt;0 then do; x=x+((x-xmean)*1.05); end; *for scale-up;&lt;BR /&gt;
y=y+((y-.69232)*1.05); * for scale-up;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data work.boxannotate;&lt;BR /&gt;
length function color $ 8;&lt;BR /&gt;
xsys='2'; ysys='2'; hsys='2';&lt;BR /&gt;
style='msolid';&lt;BR /&gt;
function='poly';&lt;BR /&gt;
when='b';&lt;BR /&gt;
color='gray88';&lt;BR /&gt;
x=-1.343; y=.681; output;&lt;BR /&gt;
function='polycont';&lt;BR /&gt;
x=x+.023; y=y+0; output;&lt;BR /&gt;
x=x+0; y=y+.023; output;&lt;BR /&gt;
x=x-.023; y=y+0; output;&lt;BR /&gt;
x=x+0; y=y-.023; output;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
goptions reset=all device=TIFFP300 gsfname=grafout gsfmode=replace rotate=portrait&lt;BR /&gt;
hsize=4in vsize=6.5in;&lt;BR /&gt;
&lt;BR /&gt;
pattern1 value=solid c=white;&lt;BR /&gt;
pattern2 v=solid c=red;&lt;BR /&gt;
&lt;BR /&gt;
filename grafout "c:\metafilesfromsas\testApril2011\test1.tif";&lt;BR /&gt;
&lt;BR /&gt;
data combined;&lt;BR /&gt;
set  state2 region17; &lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc gmap&lt;BR /&gt;
        map= combined&lt;BR /&gt;
        data= combined annotate=work.boxannotate;&lt;BR /&gt;
        id region;&lt;BR /&gt;
        choro region / woutline=3 nolegend; &lt;BR /&gt;
run;&lt;BR /&gt;
quit;&lt;BR /&gt;
run;&lt;BR /&gt;
filename grafout clear;</description>
      <pubDate>Mon, 02 May 2011 19:32:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/map-scale-up/m-p/60869#M2032</guid>
      <dc:creator>Jeff293</dc:creator>
      <dc:date>2011-05-02T19:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: map scale-up</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/map-scale-up/m-p/60870#M2033</link>
      <description>Without your data, it is hard to understand what you are trying to do.&lt;BR /&gt;
Can you clarify and explain what you are trying to accomplish by "scaling up"?</description>
      <pubDate>Tue, 03 May 2011 12:55:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/map-scale-up/m-p/60870#M2033</guid>
      <dc:creator>Darrell_sas</dc:creator>
      <dc:date>2011-05-03T12:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: map scale-up</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/map-scale-up/m-p/60871#M2034</link>
      <description>By scale-up, I want to make the "region" map appear larger on the gray square. Currently, the map occupies maybe 20 percent of the gray square. I'd like to see it larger maybe occupying 75-80 percent of the square. I am using 1.3 to scale-up in my code. thanks. Jeff</description>
      <pubDate>Tue, 03 May 2011 16:30:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/map-scale-up/m-p/60871#M2034</guid>
      <dc:creator>Jeff293</dc:creator>
      <dc:date>2011-05-03T16:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: map scale-up</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/map-scale-up/m-p/60872#M2035</link>
      <description>As Darrell said, it's difficult to debug the problem, without the data to run the code &amp;amp; try out a few things.&lt;BR /&gt;
&lt;BR /&gt;
Here are 2 working examples that might help:&lt;BR /&gt;
&lt;BR /&gt;
This first example sounds like basically what you're doing ... applying an offset and re-scaling 1 map area:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://robslink.com/SAS/democd1/explod.htm" target="_blank"&gt;http://robslink.com/SAS/democd1/explod.htm&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://robslink.com/SAS/democd1/explod_info.htm" target="_blank"&gt;http://robslink.com/SAS/democd1/explod_info.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
This second one uses a different technique ... using 'proc greplay' to draw the map in the inset area:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://robslink.com/SAS/democd41/peru_desert.htm" target="_blank"&gt;http://robslink.com/SAS/democd41/peru_desert.htm&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://robslink.com/SAS/democd41/peru_desert_info.htm" target="_blank"&gt;http://robslink.com/SAS/democd41/peru_desert_info.htm&lt;/A&gt;

Message was edited by: Robert Allison @ SAS</description>
      <pubDate>Tue, 03 May 2011 17:16:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/map-scale-up/m-p/60872#M2035</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2011-05-03T17:16:50Z</dc:date>
    </item>
  </channel>
</rss>

