<?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 Calculating Trip Length with ST_GeodesicLengthWGS84 in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/calculating-trip-length-with-st/m-p/843657#M5481</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are looking at vehicle tracking data for two of our clients.&amp;nbsp; We have about 1TB of csv data that contains long,lat,time,speed,bearing,linear g,lateral g and ignition status data.&amp;nbsp; We have setup an experimental Hadoop Cluster using the Hortonworks HDP 2.2.6 of 9 data nodes using Ambari.&amp;nbsp; We managed to ingest the data and convert to ORC file in about 2 hours.&amp;nbsp; In total we have just over 1.3 billion points.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We want to identify trips (a consecutive series of points in time for a specific vehicle between ignition on and off) to determine movement patterns over time.&amp;nbsp; This we can do using Hive queries quite easily using the lead and lag functions.&amp;nbsp; My problem however comes in when we want to calculate the length of the trip. All data is stored in WGS84 lat long so I need to use the ST_GeodesicLengthWGS84 in the spatial-framework-for-hadoop.&amp;nbsp; I have managed to build the framework and run some test queries on our hadoop cluster and all seems to be working well.&amp;nbsp; My problem is to convert the lat, long data to a line string that is required as input for ST_GeodesicLengthWGS84.&amp;nbsp; I did come across a modified constructor for ST_LineString in the following fork of the spatial-framework-for-hadoop at &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://github.com/cartershanklin/spatial-framework-for-hadoop" rel="nofollow" target="_blank"&gt;https://github.com/cartershanklin/spatial-framework-for-hadoop&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; The changes that he made were never pulled into the main repo however and it looks like a lot of changes have been made to the main repo.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anybody done similar analysis and found a way around this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Derck&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Derck Vonck&lt;/P&gt;&lt;P&gt;Technical Lead&lt;/P&gt;&lt;P&gt;esri South Africa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 20 Jun 2015 15:19:26 GMT</pubDate>
    <dc:creator>DerckVonck</dc:creator>
    <dc:date>2015-06-20T15:19:26Z</dc:date>
    <item>
      <title>Calculating Trip Length with ST_GeodesicLengthWGS84</title>
      <link>https://community.esri.com/t5/developers-questions/calculating-trip-length-with-st/m-p/843657#M5481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are looking at vehicle tracking data for two of our clients.&amp;nbsp; We have about 1TB of csv data that contains long,lat,time,speed,bearing,linear g,lateral g and ignition status data.&amp;nbsp; We have setup an experimental Hadoop Cluster using the Hortonworks HDP 2.2.6 of 9 data nodes using Ambari.&amp;nbsp; We managed to ingest the data and convert to ORC file in about 2 hours.&amp;nbsp; In total we have just over 1.3 billion points.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We want to identify trips (a consecutive series of points in time for a specific vehicle between ignition on and off) to determine movement patterns over time.&amp;nbsp; This we can do using Hive queries quite easily using the lead and lag functions.&amp;nbsp; My problem however comes in when we want to calculate the length of the trip. All data is stored in WGS84 lat long so I need to use the ST_GeodesicLengthWGS84 in the spatial-framework-for-hadoop.&amp;nbsp; I have managed to build the framework and run some test queries on our hadoop cluster and all seems to be working well.&amp;nbsp; My problem is to convert the lat, long data to a line string that is required as input for ST_GeodesicLengthWGS84.&amp;nbsp; I did come across a modified constructor for ST_LineString in the following fork of the spatial-framework-for-hadoop at &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://github.com/cartershanklin/spatial-framework-for-hadoop" rel="nofollow" target="_blank"&gt;https://github.com/cartershanklin/spatial-framework-for-hadoop&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; The changes that he made were never pulled into the main repo however and it looks like a lot of changes have been made to the main repo.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anybody done similar analysis and found a way around this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Derck&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Derck Vonck&lt;/P&gt;&lt;P&gt;Technical Lead&lt;/P&gt;&lt;P&gt;esri South Africa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2015 15:19:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/calculating-trip-length-with-st/m-p/843657#M5481</guid>
      <dc:creator>DerckVonck</dc:creator>
      <dc:date>2015-06-20T15:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Trip Length with ST_GeodesicLengthWGS84</title>
      <link>https://community.esri.com/t5/developers-questions/calculating-trip-length-with-st/m-p/843658#M5482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Derck,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have created an issue for this request on github. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/spatial-framework-for-hadoop/issues/84" style="line-height: 1.5;" title="https://github.com/Esri/spatial-framework-for-hadoop/issues/84"&gt;Add ST_LineString Hive UDF constructor for array of points. · Issue #84 · Esri/spatial-framework-for-hadoop · GitHub&lt;/A&gt;&lt;SPAN style="line-height: 1.5;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;Is it more useful for you to have a constructor that takes an array of ST_Point, or one that takes two separate arrays for x and y values?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 16:08:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/calculating-trip-length-with-st/m-p/843658#M5482</guid>
      <dc:creator>MichaelPark</dc:creator>
      <dc:date>2015-06-22T16:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Trip Length with ST_GeodesicLengthWGS84</title>
      <link>https://community.esri.com/t5/developers-questions/calculating-trip-length-with-st/m-p/843659#M5483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike&lt;/P&gt;&lt;P&gt;Either option would be good.  Although I would think that just using two arrays of double for the longitude &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/x.png" /&gt;  and latitude (y) should be a bit faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your prompt response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Derck&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ps Have you ever used the spatial framework for hadoop with ORC files? I get an error about vector not instantiated when I use ORC data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sent from Samsung Mobile&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 18:31:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/calculating-trip-length-with-st/m-p/843659#M5483</guid>
      <dc:creator>DerckVonck</dc:creator>
      <dc:date>2015-06-22T18:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Trip Length with ST_GeodesicLengthWGS84</title>
      <link>https://community.esri.com/t5/developers-questions/calculating-trip-length-with-st/m-p/843660#M5484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Either option would be good.&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sounds good.&amp;nbsp; We will probably just add both options anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Have you ever used the spatial framework for hadoop with ORC files? I get an error about vector not instantiated when I use ORC data.&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; line-height: 1.5;"&gt;I have not.&amp;nbsp; Can you create an issue in the above github repository with some information about which Hive/Hadoop versions you are using and the full error message?&amp;nbsp; If you don't have an account there, you can just reply with that information here and I'll create an issue.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 19:46:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/calculating-trip-length-with-st/m-p/843660#M5484</guid>
      <dc:creator>MichaelPark</dc:creator>
      <dc:date>2015-06-22T19:46:10Z</dc:date>
    </item>
  </channel>
</rss>

