<?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: Geo distance calculation GEODIST in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Geo-distance-calculation-GEODIST/m-p/453523#M114605</link>
    <description>&lt;P&gt;I think that your problem is the coordinates. The numbers should be in degrees, between 0 and 360, what you have is much too high.&lt;/P&gt;&lt;P&gt;Maybe you have the&amp;nbsp;wrong unit.&lt;/P&gt;&lt;P&gt;I assume that your longitudes and latitudes are 10,000 times too big, but it could be something else.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;distance2=geodist(726021,6272193,726031,6272193)*1000;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;gives a missing value,&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;distance2=geodist(72.6021,62.72193,72.6031,62.72193)*1000;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;gives a distance of 111 meters and 59 centimeters. Is that what you expected?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Apr 2018 12:42:05 GMT</pubDate>
    <dc:creator>s_lassen</dc:creator>
    <dc:date>2018-04-12T12:42:05Z</dc:date>
    <item>
      <title>Geo distance calculation GEODIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Geo-distance-calculation-GEODIST/m-p/453519#M114604</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am stucked with this. I need to calculate distance in SAS between 2 set of coordinates. I only got UTM coodinates and&lt;/P&gt;&lt;P&gt;I use geodist function. But is does not create any output on distance and distance2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help or have some ideas ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; test_distance;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; all_koordinater;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;distance=geodist(GIS_koor_X,GIS_koor_Y,Latitude2,Longitude2)*&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1000&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;distance2=geodist(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;726021&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;6272193&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;726031&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;6272193&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;)*&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1000&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;GIS_koor_X&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;GIS_koor_Y&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Latitude2&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Longitude2&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;736021,68&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6272193,06&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;731728,9625&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6273181,548&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;737435,51&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6274983,35&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;731728,9625&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6273181,548&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;737221,52&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6274654,31&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;731728,9625&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6273181,548&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;737043,37&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6274223,31&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;731728,9625&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6273181,548&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;747060,37&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6274518,13&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;721728,9625&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6273181,548&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;727043,37&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6274223,31&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;721728,9625&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6273181,548&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;727497,95&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6272526,8&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;721728,9625&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6273181,548&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;727056,14&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6273195,25&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;721728,9625&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6273181,548&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 12 Apr 2018 12:30:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Geo-distance-calculation-GEODIST/m-p/453519#M114604</guid>
      <dc:creator>ANLYNG</dc:creator>
      <dc:date>2018-04-12T12:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Geo distance calculation GEODIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Geo-distance-calculation-GEODIST/m-p/453523#M114605</link>
      <description>&lt;P&gt;I think that your problem is the coordinates. The numbers should be in degrees, between 0 and 360, what you have is much too high.&lt;/P&gt;&lt;P&gt;Maybe you have the&amp;nbsp;wrong unit.&lt;/P&gt;&lt;P&gt;I assume that your longitudes and latitudes are 10,000 times too big, but it could be something else.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;distance2=geodist(726021,6272193,726031,6272193)*1000;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;gives a missing value,&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;distance2=geodist(72.6021,62.72193,72.6031,62.72193)*1000;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;gives a distance of 111 meters and 59 centimeters. Is that what you expected?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 12:42:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Geo-distance-calculation-GEODIST/m-p/453523#M114605</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2018-04-12T12:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Geo distance calculation GEODIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Geo-distance-calculation-GEODIST/m-p/453524#M114606</link>
      <description>&lt;P&gt;the unit is UTM coordinates and should be fine. I am not sure if geodist accepts this input?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 12:45:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Geo-distance-calculation-GEODIST/m-p/453524#M114606</guid>
      <dc:creator>ANLYNG</dc:creator>
      <dc:date>2018-04-12T12:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Geo distance calculation GEODIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Geo-distance-calculation-GEODIST/m-p/453533#M114612</link>
      <description>&lt;P&gt;According to the documentation, no. UTM coordinates are not an option. Coordinates can be degrees or radians.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 13:02:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Geo-distance-calculation-GEODIST/m-p/453533#M114612</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2018-04-12T13:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Geo distance calculation GEODIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Geo-distance-calculation-GEODIST/m-p/453534#M114613</link>
      <description>&lt;P&gt;GEODIST() function cannot use UTM values as parameters. Convert those values to supported values. This function has a 5th argument &amp;lt;Options&amp;gt; (M- Miles, K- Kilometers, D-Degree and R- Radians) and the default will be 'D'. In your case it is interpreting the values as Degrees.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Document :&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003113162.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003113162.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 13:09:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Geo-distance-calculation-GEODIST/m-p/453534#M114613</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-04-12T13:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Geo distance calculation GEODIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Geo-distance-calculation-GEODIST/m-p/453537#M114615</link>
      <description>&lt;P&gt;If you have SAS/Graph, you can convert to degrees with PROC GPROJECT.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 13:14:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Geo-distance-calculation-GEODIST/m-p/453537#M114615</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2018-04-12T13:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Geo distance calculation GEODIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Geo-distance-calculation-GEODIST/m-p/646410#M193354</link>
      <description>&lt;P&gt;I don't think the UTM coordinates can be used in the SAS geodist function, try using the steps below to compute the distance&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&gt;&lt;FONT color="#000080"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;test_distance;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&gt;&lt;FONT color="#0000ff"&gt;set&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;all_koordinater;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&gt;Long_diff = Longitude1 - Longitude2&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="4"&gt;Lat_diff = Latitude1 - Latitude2;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="4"&gt;dist = sqrt ( Long_diff**2 + Lat_diff**2 );&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="4"&gt;distance = dist*0.000189394; * Convert feet to mile;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&gt;run;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 09 May 2020 17:34:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Geo-distance-calculation-GEODIST/m-p/646410#M193354</guid>
      <dc:creator>michokwu</dc:creator>
      <dc:date>2020-05-09T17:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Geo distance calculation GEODIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Geo-distance-calculation-GEODIST/m-p/646423#M193360</link>
      <description>&lt;P&gt;GEODIST is for calculating geographic distances from latitudes and longitudes. UTM coordinates are expressed in meters from the equater (y value) and one of 60 central meridians (x value). So, within a given zone, the distance between two coordinates (in meters) is given by :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;distanceInMeters = EUCLID(UTMx_1-UTMx_2, UTMy1-UTMy_2);&lt;/P&gt;</description>
      <pubDate>Sat, 09 May 2020 20:59:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Geo-distance-calculation-GEODIST/m-p/646423#M193360</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-05-09T20:59:13Z</dc:date>
    </item>
  </channel>
</rss>

