<?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: calculate distance between two nz addresses in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/calculate-distance-between-two-nz-addresses/m-p/625493#M184369</link>
    <description>&lt;P&gt;If you need travel distance it keeps a bit more complicated, you'll need to send your data to a service to get the distance, such as Google Maps, OpenStreetMaps, ESRI. Then it will return the distance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This unfortunately isn't a simple straightforward few lines of code that anyone can provide, especially since Google has now restricted their API and you need a full developer set up to get that going which is a major pain. It also means you are sending your data to an external data provider which could violate privacy regulations. If you want to go down this route, search lexjansen.com for example code, but most may be out of date due to the recent changes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.lexjansen.com/search/searchresults.php?q=distance%20between%20locations" target="_blank"&gt;https://www.lexjansen.com/search/searchresults.php?q=distance%20between%20locations&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need straight line distances that gets a lot easier. You can use PROC GEOCODE to get the latitude/longitude and then use GEODIST() function to get the distance. You could probably do that to get an upper bound on your distances as a check anyways.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/293494"&gt;@Suzy_Cat&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone share their experience in calculating distance between two nz addresses?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I had a quick browse and have no clue how to set up/access API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sad that SASHELP.ZIPCODE has no such info for New Zealand.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would be great to get the practical idea on how to actually using SAS to calculate the distance/travel time required between two address vars.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Feb 2020 02:26:43 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-02-18T02:26:43Z</dc:date>
    <item>
      <title>calculate distance between two nz addresses</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-distance-between-two-nz-addresses/m-p/625485#M184365</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone share their experience in calculating distance between two nz addresses?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I had a quick browse and have no clue how to set up/access API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sad that SASHELP.ZIPCODE has no such info for New Zealand.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would be great to get the practical idea on how to actually using SAS to calculate the distance/travel time required between two address vars.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 01:33:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-distance-between-two-nz-addresses/m-p/625485#M184365</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2020-02-18T01:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: calculate distance between two nz addresses</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-distance-between-two-nz-addresses/m-p/625493#M184369</link>
      <description>&lt;P&gt;If you need travel distance it keeps a bit more complicated, you'll need to send your data to a service to get the distance, such as Google Maps, OpenStreetMaps, ESRI. Then it will return the distance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This unfortunately isn't a simple straightforward few lines of code that anyone can provide, especially since Google has now restricted their API and you need a full developer set up to get that going which is a major pain. It also means you are sending your data to an external data provider which could violate privacy regulations. If you want to go down this route, search lexjansen.com for example code, but most may be out of date due to the recent changes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.lexjansen.com/search/searchresults.php?q=distance%20between%20locations" target="_blank"&gt;https://www.lexjansen.com/search/searchresults.php?q=distance%20between%20locations&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need straight line distances that gets a lot easier. You can use PROC GEOCODE to get the latitude/longitude and then use GEODIST() function to get the distance. You could probably do that to get an upper bound on your distances as a check anyways.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/293494"&gt;@Suzy_Cat&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone share their experience in calculating distance between two nz addresses?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I had a quick browse and have no clue how to set up/access API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sad that SASHELP.ZIPCODE has no such info for New Zealand.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would be great to get the practical idea on how to actually using SAS to calculate the distance/travel time required between two address vars.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 02:26:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-distance-between-two-nz-addresses/m-p/625493#M184369</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-02-18T02:26:43Z</dc:date>
    </item>
  </channel>
</rss>

