<?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: Drawing lines between 2 points on a map with GMAP? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Drawing-lines-between-2-points-on-a-map-with-GMAP/m-p/115135#M4359</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another option, besides the width or color of the line, would be to use alpha-transparent colors (if you have SAS 9.3 or higher).&amp;nbsp; With the alpha-transparent colors, the more lines you overlay in the same location, the more color they will get. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An example of a red alpha-transparent color would be ...&amp;nbsp; Aff000077&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Aug 2013 12:13:47 GMT</pubDate>
    <dc:creator>GraphGuy</dc:creator>
    <dc:date>2013-08-20T12:13:47Z</dc:date>
    <item>
      <title>Drawing lines between 2 points on a map with GMAP?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Drawing-lines-between-2-points-on-a-map-with-GMAP/m-p/115127#M4351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to figure out how to draw several lines between different pairs of points on a map, using PROC GMAP or some other mapping procedure. I've already done the prep work using PROC GPROJECT to get my annotation dataset projected in line with my source map dataset, and I can display my map and points with:&lt;/P&gt;&lt;P&gt;proc gmap data=States map=Map0 ;&lt;/P&gt;&lt;P&gt;id state;&lt;/P&gt;&lt;P&gt;choro state / annotate=Loc1 discrete nolegend;&lt;/P&gt;&lt;P&gt;run; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that code,&lt;/P&gt;&lt;P&gt;States comes from maps.states(where=(state not in(2 15 72))), it's basically the continental US.&lt;/P&gt;&lt;P&gt;Map0 comes from States, and then is processed similar to the dataset "Map" in this example: &lt;A href="http://support.sas.com/rnd/datavisualization/mapsonline/html/ginside_germany.html" title="http://support.sas.com/rnd/datavisualization/mapsonline/html/ginside_germany.html"&gt;SAS Maps Online&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Loc1 is my dataset of various coordinates I've plotted, and was processed similar to the dataset "Cities" in that same example. It has 30 records of coordinates, with a variable LocID numbered 1 through 30, which is how we identify them internally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far so good, and all the points in Loc1 come out exactly where they should be. Now, I'd like to be able to draw lines between the point with LocID=1 and LocID=2, or LocID=5 and LocID=7, or LocID=9 and LocID=22, and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't been able to figure out how to do this, either through PROC GMAP or some other mapping procedure. Does anyone have any suggestions for me to try or examples I could follow?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2013 16:33:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Drawing-lines-between-2-points-on-a-map-with-GMAP/m-p/115127#M4351</guid>
      <dc:creator>gfarkas</dc:creator>
      <dc:date>2013-08-19T16:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing lines between 2 points on a map with GMAP?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Drawing-lines-between-2-points-on-a-map-with-GMAP/m-p/115128#M4352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use an 'annotate' data set to place markers on the map (annotated function='pie') and connect them using annotated lines (function='move' and 'draw').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the simplest example I have...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://robslink.com/SAS/democd41/ups_tracking_map.htm" title="http://robslink.com/SAS/democd41/ups_tracking_map.htm"&gt;UPS Tracking Map (SAS/Graph gmap)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://robslink.com/SAS/democd41/ups_tracking_map_info.htm" title="http://robslink.com/SAS/democd41/ups_tracking_map_info.htm"&gt;http://robslink.com/SAS/democd41/ups_tracking_map_info.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2013 17:13:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Drawing-lines-between-2-points-on-a-map-with-GMAP/m-p/115128#M4352</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2013-08-19T17:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing lines between 2 points on a map with GMAP?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Drawing-lines-between-2-points-on-a-map-with-GMAP/m-p/115129#M4353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's great, thanks so much! I was able to follow that example and get it to work:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="gmap5.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/4049_gmap5.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;Now, the next thing I need to figure out is if there's a way to calculate the distances of those line segments. That would probably take some data manipulation and using the GEODIST function, right? Or is there a way to do it within PROC GMAP or one of the other mapping procedures?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2013 18:12:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Drawing-lines-between-2-points-on-a-map-with-GMAP/m-p/115129#M4353</guid>
      <dc:creator>gfarkas</dc:creator>
      <dc:date>2013-08-19T18:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing lines between 2 points on a map with GMAP?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Drawing-lines-between-2-points-on-a-map-with-GMAP/m-p/115130#M4354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use Geodist, but you'll need to make the calculations on the lat/long values *before* you project them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2013 18:14:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Drawing-lines-between-2-points-on-a-map-with-GMAP/m-p/115130#M4354</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2013-08-19T18:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing lines between 2 points on a map with GMAP?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Drawing-lines-between-2-points-on-a-map-with-GMAP/m-p/115131#M4355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One other thing... is there a way to offset multiple lines that collect the same 2 points? For example, if these represent travel between 2 cities, and someone travels between the same two cities more than once, can there be multiple lines next to each other but slightly offset? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2013 18:47:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Drawing-lines-between-2-points-on-a-map-with-GMAP/m-p/115131#M4355</guid>
      <dc:creator>gfarkas</dc:creator>
      <dc:date>2013-08-19T18:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing lines between 2 points on a map with GMAP?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Drawing-lines-between-2-points-on-a-map-with-GMAP/m-p/115132#M4356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a way to offset text, using the annotate 'position' (position='5', position='2', etc), but there is not a built-in way to apply offsets to the drawn graphics (such as pie markers and lines/arrows).&amp;nbsp; You will have to programmatically manipulate the x/y coordinates in your data to do that.&amp;nbsp; (I think this will not be easy.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2013 18:50:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Drawing-lines-between-2-points-on-a-map-with-GMAP/m-p/115132#M4356</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2013-08-19T18:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing lines between 2 points on a map with GMAP?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Drawing-lines-between-2-points-on-a-map-with-GMAP/m-p/115133#M4357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unless the number of trips is large, you might be able to summarize your data and get counts of duplicate trips. Then factor the number into a line width parameter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2013 19:41:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Drawing-lines-between-2-points-on-a-map-with-GMAP/m-p/115133#M4357</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-08-19T19:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing lines between 2 points on a map with GMAP?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Drawing-lines-between-2-points-on-a-map-with-GMAP/m-p/115134#M4358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to both of you for your responses. What you wrote makes sense, and is along the lines of what I was thinking... it's good to get confirmation on it, definitely.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 01:57:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Drawing-lines-between-2-points-on-a-map-with-GMAP/m-p/115134#M4358</guid>
      <dc:creator>gfarkas</dc:creator>
      <dc:date>2013-08-20T01:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing lines between 2 points on a map with GMAP?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Drawing-lines-between-2-points-on-a-map-with-GMAP/m-p/115135#M4359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another option, besides the width or color of the line, would be to use alpha-transparent colors (if you have SAS 9.3 or higher).&amp;nbsp; With the alpha-transparent colors, the more lines you overlay in the same location, the more color they will get. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An example of a red alpha-transparent color would be ...&amp;nbsp; Aff000077&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 12:13:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Drawing-lines-between-2-points-on-a-map-with-GMAP/m-p/115135#M4359</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2013-08-20T12:13:47Z</dc:date>
    </item>
  </channel>
</rss>

