<?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 improve on a SAMPLE in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/improve-on-a-SAMPLE/m-p/112285#M23219</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;-----&amp;gt; just for fun.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;a really useful resource provided (and fully funded) by SAS Instiutute is the SAS Samples library.&lt;/P&gt;&lt;P&gt;One of the great ways to learn new ideas is to watch the RSS feed for interesting topics.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I spotted at the top the SAMPLE rss feed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Sample &lt;EM&gt;22872: &lt;/EM&gt;Determine which counties border a specific county&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As with all Samples this is a tabbed webpage with the FullCode tab revealing code you can run yourself to try it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----&amp;gt; just for fun.&lt;/P&gt;&lt;P&gt;It is a personal challenge of mine, to see if I can add some value by an alternative approach: and this time I think I might&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Rather than 6 steps and a proc print, here is one SQL step implementing the same search algorithm described in the SAMPLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;"Assuming that each bordering polygon shares at least one common point, determine the neighboring counties for a given county"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13611992228796066" jivemacro_uid="_13611992228796066"&gt;
&lt;P&gt;proc sql ;&lt;/P&gt;
&lt;P&gt;create table adjacent_counties as&lt;/P&gt;
&lt;P&gt;select distinct&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.state&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as state1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , b.state&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as state2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , a.county&amp;nbsp;&amp;nbsp;&amp;nbsp; as county1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , b.county&amp;nbsp;&amp;nbsp;&amp;nbsp; as county2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , c.statename as stateN1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , d.statename as stateN2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , c.countynm&amp;nbsp; as countyN1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , d.countynm&amp;nbsp; as countyN2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; from MAPS.USCOUNTY a&lt;/P&gt;
&lt;P&gt;&amp;nbsp; join MAPS.USCOUNTY b&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; on a.x = b.x&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; and a.y = b.y&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; and a.county NE b.county&lt;/P&gt;
&lt;P&gt;&amp;nbsp; join ( select distinct statename, countynm, county, state&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from maps.cntyname)&amp;nbsp; c&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; on a.state&amp;nbsp;&amp;nbsp; = c.state&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; and a.county&amp;nbsp; = c.county&lt;/P&gt;
&lt;P&gt;&amp;nbsp; join ( select distinct statename, countynm, county, state&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from maps.cntyname)&amp;nbsp; d&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; on b.state&amp;nbsp;&amp;nbsp; = d.state&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; and b.county = d.county&lt;/P&gt;
&lt;P&gt;where b.county ne a.county&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;
&lt;P&gt;quit ;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;With no STATE filters, it produces a table of about 18K rows of adjacent counties, in about half a second&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if we seek the regions which might not share boundary points but are still adjacent or overlap, how much more complex would does the query become?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm struggling with the coordinate maths for the polygons.&lt;/P&gt;&lt;P&gt;It is easy enough for a data step to provide a table with start and endpoint for each line in the polygons of the map.&amp;nbsp; Point X0/Y0 to point X/Y.&lt;/P&gt;&lt;P&gt;This code generates the set&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1361199222512603" jivemacro_uid="_1361199222512603"&gt;
&lt;P&gt;data stepf ;&lt;/P&gt;
&lt;P&gt;keep&amp;nbsp;&amp;nbsp; state county segment spot x0 x y0 y ;&lt;/P&gt;
&lt;P&gt;retain state county segment spot x0 y0&amp;nbsp; ; ** just to control VAR order ;&lt;/P&gt;
&lt;P&gt;do until( last.state) ;&lt;/P&gt;
&lt;P&gt;do until( last.county ) ;&lt;/P&gt;
&lt;P&gt;call missing(x0, y0 ) ;&amp;nbsp; ** start point ;&lt;/P&gt;
&lt;P&gt;do spot = 0 by 1 until( last.segment ) ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set maps.uscounty end= eof ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; by state county segment notsorted ;&lt;/P&gt;
&lt;P&gt;* where state in(11,24) ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if spot then output ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; else do ; * save starting point ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xs = x ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ys = y ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; x0 = x;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; y0 = y;&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; x = xs ; *** final point on segment connects to first;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; y = ys ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; output ;&lt;/P&gt;
&lt;P&gt;end;end;&lt;/P&gt;
&lt;P&gt;if eof then stop ;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I'm struggling to define cross-over or co-linearity between segment lines of adjacent counties, in terms of&amp;nbsp; X,Y,x0,y0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----&amp;gt; just for fun.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;peterC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Feb 2013 13:00:23 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2013-02-18T13:00:23Z</dc:date>
    <item>
      <title>improve on a SAMPLE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/improve-on-a-SAMPLE/m-p/112285#M23219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;-----&amp;gt; just for fun.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;a really useful resource provided (and fully funded) by SAS Instiutute is the SAS Samples library.&lt;/P&gt;&lt;P&gt;One of the great ways to learn new ideas is to watch the RSS feed for interesting topics.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I spotted at the top the SAMPLE rss feed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Sample &lt;EM&gt;22872: &lt;/EM&gt;Determine which counties border a specific county&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As with all Samples this is a tabbed webpage with the FullCode tab revealing code you can run yourself to try it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----&amp;gt; just for fun.&lt;/P&gt;&lt;P&gt;It is a personal challenge of mine, to see if I can add some value by an alternative approach: and this time I think I might&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Rather than 6 steps and a proc print, here is one SQL step implementing the same search algorithm described in the SAMPLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;"Assuming that each bordering polygon shares at least one common point, determine the neighboring counties for a given county"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13611992228796066" jivemacro_uid="_13611992228796066"&gt;
&lt;P&gt;proc sql ;&lt;/P&gt;
&lt;P&gt;create table adjacent_counties as&lt;/P&gt;
&lt;P&gt;select distinct&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.state&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as state1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , b.state&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as state2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , a.county&amp;nbsp;&amp;nbsp;&amp;nbsp; as county1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , b.county&amp;nbsp;&amp;nbsp;&amp;nbsp; as county2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , c.statename as stateN1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , d.statename as stateN2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , c.countynm&amp;nbsp; as countyN1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , d.countynm&amp;nbsp; as countyN2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; from MAPS.USCOUNTY a&lt;/P&gt;
&lt;P&gt;&amp;nbsp; join MAPS.USCOUNTY b&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; on a.x = b.x&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; and a.y = b.y&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; and a.county NE b.county&lt;/P&gt;
&lt;P&gt;&amp;nbsp; join ( select distinct statename, countynm, county, state&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from maps.cntyname)&amp;nbsp; c&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; on a.state&amp;nbsp;&amp;nbsp; = c.state&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; and a.county&amp;nbsp; = c.county&lt;/P&gt;
&lt;P&gt;&amp;nbsp; join ( select distinct statename, countynm, county, state&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from maps.cntyname)&amp;nbsp; d&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; on b.state&amp;nbsp;&amp;nbsp; = d.state&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; and b.county = d.county&lt;/P&gt;
&lt;P&gt;where b.county ne a.county&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;
&lt;P&gt;quit ;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;With no STATE filters, it produces a table of about 18K rows of adjacent counties, in about half a second&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if we seek the regions which might not share boundary points but are still adjacent or overlap, how much more complex would does the query become?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm struggling with the coordinate maths for the polygons.&lt;/P&gt;&lt;P&gt;It is easy enough for a data step to provide a table with start and endpoint for each line in the polygons of the map.&amp;nbsp; Point X0/Y0 to point X/Y.&lt;/P&gt;&lt;P&gt;This code generates the set&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1361199222512603" jivemacro_uid="_1361199222512603"&gt;
&lt;P&gt;data stepf ;&lt;/P&gt;
&lt;P&gt;keep&amp;nbsp;&amp;nbsp; state county segment spot x0 x y0 y ;&lt;/P&gt;
&lt;P&gt;retain state county segment spot x0 y0&amp;nbsp; ; ** just to control VAR order ;&lt;/P&gt;
&lt;P&gt;do until( last.state) ;&lt;/P&gt;
&lt;P&gt;do until( last.county ) ;&lt;/P&gt;
&lt;P&gt;call missing(x0, y0 ) ;&amp;nbsp; ** start point ;&lt;/P&gt;
&lt;P&gt;do spot = 0 by 1 until( last.segment ) ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set maps.uscounty end= eof ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; by state county segment notsorted ;&lt;/P&gt;
&lt;P&gt;* where state in(11,24) ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if spot then output ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; else do ; * save starting point ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xs = x ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ys = y ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; x0 = x;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; y0 = y;&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; x = xs ; *** final point on segment connects to first;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; y = ys ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; output ;&lt;/P&gt;
&lt;P&gt;end;end;&lt;/P&gt;
&lt;P&gt;if eof then stop ;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I'm struggling to define cross-over or co-linearity between segment lines of adjacent counties, in terms of&amp;nbsp; X,Y,x0,y0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----&amp;gt; just for fun.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;peterC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2013 13:00:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/improve-on-a-SAMPLE/m-p/112285#M23219</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2013-02-18T13:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: improve on a SAMPLE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/improve-on-a-SAMPLE/m-p/112286#M23220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That appears to be an efficient/concise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I took the SQL approach too.&amp;nbsp; But, similar to the SAS tech support example, I broke it up into several pieces.&lt;/P&gt;&lt;P&gt;I find it easier to trouble-shoot, and easier for other people to understand/modify/enhance/maintain that way &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My example finds the counties adjacent to the county a given city is in, and also displays them on a map...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://robslink.com/SAS/democd26/adjacent.htm" style="font-size: 10pt; line-height: 1.5em;" title="http://robslink.com/SAS/democd26/adjacent.htm"&gt;Counties bordering Cary, NC (SAS/Graph gmap)&lt;/A&gt; &amp;lt;-- sample output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://robslink.com/SAS/democd26/adjacent_info.htm" title="http://robslink.com/SAS/democd26/adjacent_info.htm"&gt;http://robslink.com/SAS/democd26/adjacent_info.htm&lt;/A&gt; &amp;lt;-- link to the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I don't have an answer for finding "adjacent" counties that don't share common border points.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 13:23:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/improve-on-a-SAMPLE/m-p/112286#M23220</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2013-02-19T13:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: improve on a SAMPLE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/improve-on-a-SAMPLE/m-p/112287#M23221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rounding through converting to a string is an interesting approach to improving the proximity of points. I'm not sure how much distance is implied beyond the 5-th dec place but it can't be much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Line approach and intersection and overlap problems:&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;for example, with no common map points, the lines A(Ax1,Ay1 to Ax2,Ay2) and B(Bx1,By1 to Bx2,By2) share an overlapping horizontal line, indicating a shared boundary&lt;/P&gt;&lt;P&gt;..................Ax1...........Bx1......................Bx2....................Ax2.........&amp;nbsp; (the Ay and By are not shown because for this simple example all are equal.)&lt;/P&gt;&lt;P&gt;so might not feature among any of our adjacent counties &lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;unless the polygons of the maps are created like a honeycomb with all adjacent boundaries sharing points, I expect there will be places where polygons might intersect or cross over, at corners for example: - would the mapping procedures reject these maps as invalid?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;peter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 20:09:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/improve-on-a-SAMPLE/m-p/112287#M23221</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2013-02-19T20:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: improve on a SAMPLE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/improve-on-a-SAMPLE/m-p/112288#M23222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some mapping &amp;amp; GIS software cares whether the map areas are "topologically correct" (with no overlapping polygons, and shared borders also share the exact same points, etc).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But SAS/Graph Proc Gmap does not care, and draws whatever you give it (I sometimes create overlapping polygons intentionally, for special effects, or when I'm lazy)&amp;nbsp; &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 20:15:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/improve-on-a-SAMPLE/m-p/112288#M23222</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2013-02-19T20:15:21Z</dc:date>
    </item>
  </channel>
</rss>

