<?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: How to use gproject or annotation correctly? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-use-gproject-or-annotation-correctly/m-p/65835#M2245</link>
    <description>Ahh! ... round dots!  This topic has gone round &amp;amp; round on the forum lately!&lt;BR /&gt;
(pun intended! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
Depending on what kind of output you can use, you might try some other goptions device= settings, such as pdf or svg.  Depending on several factors, you might get dots with smoother more-round edges.&lt;BR /&gt;
&lt;BR /&gt;
Also, you might try an style='pempty' (outline) rather than style='psolid' - sometimes that makes a difference.&lt;BR /&gt;
&lt;BR /&gt;
There are also several other tips in a recent thread - I'll let you check them out there, rather than repeat them here.&lt;BR /&gt;
&lt;BR /&gt;
Also, in the 9.3 version (currently under development), there have been some improvements ... but it will be a while before 9.3 is completed, and available to customers.  &lt;BR /&gt;
&lt;BR /&gt;
This might be a good issue to call-in to Tech Support, so they can document in the official system that this is causing problems.  This will help make it more likely to get fixed.</description>
    <pubDate>Fri, 28 Jan 2011 13:30:36 GMT</pubDate>
    <dc:creator>GraphGuy</dc:creator>
    <dc:date>2011-01-28T13:30:36Z</dc:date>
    <item>
      <title>How to use gproject or annotation correctly?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-use-gproject-or-annotation-correctly/m-p/65831#M2241</link>
      <description>Below is my code. I don't know where it goes wrong. Two address points don't show up in the graph. Maybe I don't do gproject or annotation correctly. Any help is appreciated.&lt;BR /&gt;
&lt;BR /&gt;
===============================================&lt;BR /&gt;
data city1;&lt;BR /&gt;
  city='Milford'; state_cd='DE'; zip=19963; state=10;&lt;BR /&gt;
  output;&lt;BR /&gt;
  city='Hartly'; state_cd='DE'; zip=19953; state=10;&lt;BR /&gt;
  output;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc geocode zip&lt;BR /&gt;
  addressstatevar=state_cd&lt;BR /&gt;
  data=city1&lt;BR /&gt;
  out=city2;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc gproject deg&lt;BR /&gt;
  data=city2&lt;BR /&gt;
  out=city3;&lt;BR /&gt;
  id state;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data city_anno;&lt;BR /&gt;
  set city3;&lt;BR /&gt;
  when='A';&lt;BR /&gt;
  xsys='3'; ysys='3';&lt;BR /&gt;
  function='label';&lt;BR /&gt;
  color='cx330099'; size=1.25; text='J';   &lt;BR /&gt;
  position='5'; style='special';&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data de1;&lt;BR /&gt;
  set maps.states;&lt;BR /&gt;
  if state=10;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
title;&lt;BR /&gt;
&lt;BR /&gt;
proc gproject&lt;BR /&gt;
  data=maps.states&lt;BR /&gt;
  out=de;&lt;BR /&gt;
  id state;&lt;BR /&gt;
  where state=10;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
pattern v=e;&lt;BR /&gt;
&lt;BR /&gt;
proc gmap map = de&lt;BR /&gt;
          anno = city_anno; &lt;BR /&gt;
id state;&lt;BR /&gt;
choro state / nolegend;&lt;BR /&gt;
run;&lt;BR /&gt;
quit;</description>
      <pubDate>Wed, 26 Jan 2011 07:57:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-use-gproject-or-annotation-correctly/m-p/65831#M2241</guid>
      <dc:creator>MarcTC</dc:creator>
      <dc:date>2011-01-26T07:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to use gproject or annotation correctly?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-use-gproject-or-annotation-correctly/m-p/65832#M2242</link>
      <description>There were several problems, such as...&lt;BR /&gt;
&lt;BR /&gt;
You can't gproject the map &amp;amp; annotate data sets separately, or they'll both be projected into different/independent x/y min/max.&lt;BR /&gt;
&lt;BR /&gt;
Need to convert the lat/long degrees to radians, so they are in the same coordinate system as the map.&lt;BR /&gt;
&lt;BR /&gt;
Need to multiply the long by -1, so it is the same (eastlong/westlong) as the map's longitude.&lt;BR /&gt;
&lt;BR /&gt;
Need to use the data coordinate system xsys/ysys=2, rather than 3.&lt;BR /&gt;
&lt;BR /&gt;
I think the following modified code will do what you're wanting:&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data city1;&lt;BR /&gt;
  city='Milford'; state_cd='DE'; zip=19963; state=10;&lt;BR /&gt;
  output;&lt;BR /&gt;
  city='Hartly'; state_cd='DE'; zip=19953; state=10;&lt;BR /&gt;
  output;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc geocode zip&lt;BR /&gt;
  addressstatevar=state_cd&lt;BR /&gt;
  data=city1&lt;BR /&gt;
  out=city2;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data city_anno; set city2;&lt;BR /&gt;
  /* Convert degrees to radians */&lt;BR /&gt;
  x=atan(1)/45 * x * -1;&lt;BR /&gt;
  y=atan(1)/45 * y;&lt;BR /&gt;
&lt;BR /&gt;
  when='A'; xsys='2'; ysys='2'; hsys='3';&lt;BR /&gt;
  function='pie'; color='cx330099'; size=1.5;   &lt;BR /&gt;
  style='psolid'; rotate=360;&lt;BR /&gt;
  annoflag=1;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data de;&lt;BR /&gt;
  set maps.states (where=(state=10));&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
/* combine the map &amp;amp; annotate, gproject them together, then separate them */&lt;BR /&gt;
data combined; set de city_anno;&lt;BR /&gt;
proc gproject data=combined out=combined;&lt;BR /&gt;
  id state;&lt;BR /&gt;
run;&lt;BR /&gt;
data de city_anno; set combined;&lt;BR /&gt;
 if annoflag=1 then output city_anno;&lt;BR /&gt;
 else output de;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
title;&lt;BR /&gt;
goptions cback=white;&lt;BR /&gt;
pattern v=s c=white;&lt;BR /&gt;
proc gmap map=de anno=city_anno; &lt;BR /&gt;
 id state;&lt;BR /&gt;
 choro state / levels=1 nolegend coutline=gray55;&lt;BR /&gt;
run;&lt;BR /&gt;
quit;</description>
      <pubDate>Wed, 26 Jan 2011 13:21:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-use-gproject-or-annotation-correctly/m-p/65832#M2242</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2011-01-26T13:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to use gproject or annotation correctly?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-use-gproject-or-annotation-correctly/m-p/65833#M2243</link>
      <description>This is really helpful! Thanks, Robert.</description>
      <pubDate>Wed, 26 Jan 2011 16:23:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-use-gproject-or-annotation-correctly/m-p/65833#M2243</guid>
      <dc:creator>MarcTC</dc:creator>
      <dc:date>2011-01-26T16:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to use gproject or annotation correctly?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-use-gproject-or-annotation-correctly/m-p/65834#M2244</link>
      <description>If I change the size to be 0.5 in data city_anno step, proc gmap doesn't produce a round dot for me.&lt;BR /&gt;
&lt;BR /&gt;
data city_anno; set city2;&lt;BR /&gt;
/* Convert degrees to radians */&lt;BR /&gt;
x=atan(1)/45 * x * -1;&lt;BR /&gt;
y=atan(1)/45 * y;&lt;BR /&gt;
&lt;BR /&gt;
when='A'; xsys='2'; ysys='2'; hsys='3';&lt;BR /&gt;
function='pie'; color='cx330099'; size=0.5; &lt;BR /&gt;
style='psolid'; rotate=360;&lt;BR /&gt;
annoflag=1;&lt;BR /&gt;
run;&lt;B&gt;&lt;/B&gt;</description>
      <pubDate>Fri, 28 Jan 2011 02:24:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-use-gproject-or-annotation-correctly/m-p/65834#M2244</guid>
      <dc:creator>MarcTC</dc:creator>
      <dc:date>2011-01-28T02:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to use gproject or annotation correctly?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-use-gproject-or-annotation-correctly/m-p/65835#M2245</link>
      <description>Ahh! ... round dots!  This topic has gone round &amp;amp; round on the forum lately!&lt;BR /&gt;
(pun intended! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
Depending on what kind of output you can use, you might try some other goptions device= settings, such as pdf or svg.  Depending on several factors, you might get dots with smoother more-round edges.&lt;BR /&gt;
&lt;BR /&gt;
Also, you might try an style='pempty' (outline) rather than style='psolid' - sometimes that makes a difference.&lt;BR /&gt;
&lt;BR /&gt;
There are also several other tips in a recent thread - I'll let you check them out there, rather than repeat them here.&lt;BR /&gt;
&lt;BR /&gt;
Also, in the 9.3 version (currently under development), there have been some improvements ... but it will be a while before 9.3 is completed, and available to customers.  &lt;BR /&gt;
&lt;BR /&gt;
This might be a good issue to call-in to Tech Support, so they can document in the official system that this is causing problems.  This will help make it more likely to get fixed.</description>
      <pubDate>Fri, 28 Jan 2011 13:30:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-use-gproject-or-annotation-correctly/m-p/65835#M2245</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2011-01-28T13:30:36Z</dc:date>
    </item>
  </channel>
</rss>

