<?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: Creating an Array based on Definition/Points in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/creating-an-array-based-on-definition-points/m-p/525603#M41173</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be aiming for something like this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="string token"&gt;'Rhino1'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;X1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Y1&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;X2&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Y2&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="string token"&gt;'Rhino2'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;X1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Y1&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;X2&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Y2&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 22:54:10 GMT</pubDate>
    <dc:creator>DarrenWiens2</dc:creator>
    <dc:date>2021-12-11T22:54:10Z</dc:date>
    <item>
      <title>Creating an Array based on Definition/Points</title>
      <link>https://community.esri.com/t5/python-questions/creating-an-array-based-on-definition-points/m-p/525598#M41168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm currently new to python and working on a Class Project trying to create multiple polylines based on the tracking of Rhinos. I have the approach right, but I somehow have the variables switched around.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Rhino would be the key value, and the points would have to be added into it. The example would be "Rhino : {(Point 1),(Point 2)}".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Somehow I can't get it. I can get the polyline to form, but I only get one giant line and not a multiple set of polylines based on the Rhino.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the script I have written down.(re-edited to just the definition of the function)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;rhinoTracker&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Rhino&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; X&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Y&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; dictionary&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;

XYCoord &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;X&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Y&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; Rhino &lt;SPAN class="operator token"&gt;not&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; dictionary&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; dictionary&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;Rhino&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

dictionary&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;Rhino&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;XYCoord&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:54:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-an-array-based-on-definition-points/m-p/525598#M41168</guid>
      <dc:creator>JacobHorwitz1</dc:creator>
      <dc:date>2021-12-11T22:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an Array based on Definition/Points</title>
      <link>https://community.esri.com/t5/python-questions/creating-an-array-based-on-definition-points/m-p/525599#M41169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jacob...&lt;/P&gt;&lt;P&gt;raw encode your file paths&amp;nbsp; ie&amp;nbsp; r"c:\Your\Folder\and\file.py"&amp;nbsp; a little 'r'&lt;/P&gt;&lt;P&gt;If you get one big line, then you shouldn't be adding all the points to the array all at once, but break it up into rhino bits.&lt;/P&gt;&lt;P&gt;Maybe if you show how many points are associated with a rhino from your table it would help dissect the code&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2018 03:02:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-an-array-based-on-definition-points/m-p/525599#M41169</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-10-04T03:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an Array based on Definition/Points</title>
      <link>https://community.esri.com/t5/python-questions/creating-an-array-based-on-definition-points/m-p/525600#M41170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This the csv file it is based off of and there a re a total of 51 points.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.e-education.psu.edu/geog485/sites/www.e-education.psu.edu.geog485/files/data/RhinoObservations.csv" title="https://www.e-education.psu.edu/geog485/sites/www.e-education.psu.edu.geog485/files/data/RhinoObservations.csv"&gt;https://www.e-education.psu.edu/geog485/sites/www.e-education.psu.edu.geog485/files/data/RhinoObservations.csv&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2018 03:23:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-an-array-based-on-definition-points/m-p/525600#M41170</guid>
      <dc:creator>JacobHorwitz1</dc:creator>
      <dc:date>2018-10-04T03:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an Array based on Definition/Points</title>
      <link>https://community.esri.com/t5/python-questions/creating-an-array-based-on-definition-points/m-p/525601#M41171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first thing I would do is sort the csv based on the Rhino name (numpy, spreadsheet, whatever)&lt;/P&gt;&lt;P&gt;That way Tulip and Bo's points are grouped.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sadly, there is no temporal information so just connecting the points isn't going to work because there is no guarantee that the points were collected in sequential time.&lt;/P&gt;&lt;P&gt;I would bring the table into Pro as an event layer (in sorted by rhino name, or sort it in Pro).&lt;/P&gt;&lt;P&gt;Save to a feature class.&amp;nbsp; Split by attributes (tool) and then you can hope that the points sort spatially... if not, produce a spanning tree (my point tools on the Code Sharing site).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course since this is a lab... maybe everything is nicely sorted and the observer information was all on one day... this info isn't available, so I am thinking worst case scenario &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;have fun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2018 03:34:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-an-array-based-on-definition-points/m-p/525601#M41171</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-10-04T03:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an Array based on Definition/Points</title>
      <link>https://community.esri.com/t5/python-questions/creating-an-array-based-on-definition-points/m-p/525602#M41172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With the definition at least, would there need to be a variable that needs to changed around so I could have the results change to&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;"Rhino : {(Point 1),(Point 2)}"&lt;/SPAN&gt; instead of {Rhino : [(Point 1),(Point 2)]}? That been my biggest problem so far.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2018 04:50:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-an-array-based-on-definition-points/m-p/525602#M41172</guid>
      <dc:creator>JacobHorwitz1</dc:creator>
      <dc:date>2018-10-04T04:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an Array based on Definition/Points</title>
      <link>https://community.esri.com/t5/python-questions/creating-an-array-based-on-definition-points/m-p/525603#M41173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be aiming for something like this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="string token"&gt;'Rhino1'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;X1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Y1&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;X2&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Y2&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="string token"&gt;'Rhino2'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;X1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Y1&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;X2&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Y2&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:54:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-an-array-based-on-definition-points/m-p/525603#M41173</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T22:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an Array based on Definition/Points</title>
      <link>https://community.esri.com/t5/python-questions/creating-an-array-based-on-definition-points/m-p/525604#M41174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Somehow I can't get it. I can get the polyline to form, but I only get one giant line and not a multiple set of polylines based on the Rhino.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;On top of the other issues people have pointed out, what exactly do you want the output to look like?&amp;nbsp; Do you want a single, multi-part line, multiple single-part lines, or multiple multi-part lines?&amp;nbsp; And, what criteria is used to break up the features and lines into different parts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2018 15:57:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-an-array-based-on-definition-points/m-p/525604#M41174</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-12-17T15:57:09Z</dc:date>
    </item>
  </channel>
</rss>

