<?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: points to polygons in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268705#M9252</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;...sorry, Siran, I've been a little busy with other problems.&amp;nbsp; I took a brief look at your attachments - so far so good except it doesn't look like you were able to achieve a finished channel polygon result?&amp;nbsp; If you run the script as I have last posted with a similar line file as you have posted earlier, it should run to completion (you have ArcInfo, or the advanced ArcGIS Desktop, correct?).&amp;nbsp; So, I have 2 questions/comments pertaining to the scripting:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Did you have any error messages in the script run or do you have any specific related questions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- You should attach your original script file -- do not copy to a Word document as this serves no purpose (and can create indention errors, failure in Python - so leave as is in the py file and attach that).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And I strongly suggest this (and you may have already followed up accordingly) -- check back with your associates familiar with the model output/techniques to be certain that your solution fits the problem.&amp;nbsp; I am only familiar with the scripting techniques...not whether they are appropriate for your scenario.&amp;nbsp; Consider that a final disclaimer.&amp;nbsp; Just want you to know I enjoyed the challenge you posed, thank you, and if you are at a point you are satisfied with my 'contribution', please mark this post 'answered'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again - if you have additional questions I can answer (scripting related), please be specific and I'll get back to you.&amp;nbsp; Otherwise, looks good so far, so keep trying.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Wayne&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Nov 2012 16:49:15 GMT</pubDate>
    <dc:creator>T__WayneWhitley</dc:creator>
    <dc:date>2012-11-28T16:49:15Z</dc:date>
    <item>
      <title>points to polygons</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268678#M9225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I???m trying to delineate polygons along a river channel delineated by points representing different n values. I was wondering if anyone knew of a tool that would allow me to create polygons based on the same input value instead of what I am doing now which is connecting the dots. I tried Thiessen polygons but it gave me shapes that went way outside the boundaries of the points. Anyone know of such a function? See attachment for screen capture.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 19:29:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268678#M9225</guid>
      <dc:creator>SiranErysian</dc:creator>
      <dc:date>2012-10-12T19:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: points to polygons</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268679#M9226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Depends... if you have sequence IDs as a means to determine the order of "connecting the dots" so to speak, then yes, that can be easily scripted - if there is no other ready means (other than visual inspection), that's another story.&amp;nbsp; I saw your pic - those IDs group the points and that's fine, but are there more available attributes?&amp;nbsp; Are these GPS points?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 22:49:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268679#M9226</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2012-10-12T22:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: points to polygons</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268680#M9227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It appears that there are FID numbers but what I want to connect would be the odd numbers on one side of the bank and the even numbers on the other side. These are the numbers on the new attachment. Is this possible?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are no other attributes to the file. THey were generated from a Hec GeoRas model.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2012 21:36:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268680#M9227</guid>
      <dc:creator>SiranErysian</dc:creator>
      <dc:date>2012-10-22T21:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: points to polygons</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268681#M9228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So you really need to connect in an order as in, for example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;['point1', 'point3', 'point5', 'point6', 'point4', 'point2']&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically, your solution lies in that with arcpy geom methods you can load points into an array to in turn load into a line or polygon geometry object.&amp;nbsp; The 'puzzle', if you will, is what sequence you feed the points in... it's late, so I don't have the finished code sample at the moment, but consider this (and make sure it is based on accurate assumptions):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You said you had points in a sequence, odd on one side, even on the other.&amp;nbsp; I've seen your picture - just not sure yet how the 'polygon' closes, but this is not as critical as it is to at least get an algorithm going for 'connecting the dots'...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So what you need is a device for loading odd points, then even points...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-- (This may not be optimal code, but it'll work.)--- &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
# For example say instead of the string list shown, the following is a python list of point objects:
&amp;gt;&amp;gt;&amp;gt; points = ['point1', 'point2', 'point3', 'point4', 'point5', 'point6']

# Define 2 new lists to load for left and right sides:
&amp;gt;&amp;gt;&amp;gt; pointsLeft = []
&amp;gt;&amp;gt;&amp;gt; pointsRight = []

Now you need a looping mechanism to load the empty lists:
&amp;gt;&amp;gt;&amp;gt; for i in range(0,len(points)-1,2):
 pointsLeft.append(points&lt;I&gt;)
 pointsRight.append(points[i+1])

# Now the lists are 'segregated' odd and even:
&amp;gt;&amp;gt;&amp;gt; print pointsLeft
['point1', 'point3', 'point5']

&amp;gt;&amp;gt;&amp;gt; print pointsRight
['point2', 'point4', 'point6']

# Reverse the order, say on the right, to set up 'connecting' the 2 lines:
&amp;gt;&amp;gt;&amp;gt; pointsRight.sort(reverse=True)

&amp;gt;&amp;gt;&amp;gt; print pointsRight
['point6', 'point4', 'point2']

# Now the list can be 'mashed' together:
&amp;gt;&amp;gt;&amp;gt; for eachPoint in pointsRight:
 pointsLeft.append(eachPoint)

# Still called 'pointsLeft', but it's really a sequence around both sides... 
&amp;gt;&amp;gt;&amp;gt; print pointsLeft
['point1', 'point3', 'point5', 'point6', 'point4', 'point2']
&amp;gt;&amp;gt;&amp;gt;
&lt;/I&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:09:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268681#M9228</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2021-12-11T13:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: points to polygons</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268682#M9229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Wow, Thanks. I'll have to read this over several times to absorb it. Not a real expert on Python but its practical stuff and makes sense when I read it. Will get back to you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2012 14:58:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268682#M9229</guid>
      <dc:creator>SiranErysian</dc:creator>
      <dc:date>2012-10-23T14:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: points to polygons</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268683#M9230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, then, once you've digested that, getting your point objects into the list (I guess you'll be doing this with a searchcursor), the rest isn't too difficult.&amp;nbsp; This may not be the way you go exactly, but could be an example, if not too premature to load you up with more to read---&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
# these are point objects (no longer text)
points = [point1, point2, point3, point4, point5, point6]

array = arcpy.Array()

for point in points:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array.add(point)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
# close the poly
array.add(points[0])

# load the array into geometry object
polygon = arcpy.Polygon(array)


# Here, you'll probably want an insertcursor to loop and load geometry for multiple features...
# But for demo on a single feature, you can use copy features:
arcpy.CopyFeatures_management(polygon, r'C:\JustTesting.shp')
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:09:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268683#M9230</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2021-12-11T13:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: points to polygons</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268684#M9231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks. I have been off on another project but will get back to this in the next day or so.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You mentioned closing the polygons: I'd like to do this where the n-values change (manning's coefficient value) which is in the attribute table as n-value. Would this be possible to insert somewhere in the code or I can just split the polygon created at those locations? See attachment. Upper number in label is the FID and lower number is the n-value.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 22:32:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268684#M9231</guid>
      <dc:creator>SiranErysian</dc:creator>
      <dc:date>2012-10-25T22:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: points to polygons</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268685#M9232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Certainly.&amp;nbsp; Can you attach a sample of your data?&amp;nbsp; I ask because at this point it would probably be easiest to write the code specifically adapted to your input, whether that be a point feature class with these n-values in the attribute table or other format, such as a text input file containing these values in addition to XY point coords.&amp;nbsp; It would be easier to explain it with comments in the code which I can post here.&amp;nbsp; In short, I can give you the below explanation (along with that above for sorting the input).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you already have a point feature class, you can use a sorted search cursor to access each table row and transfer point object geometry directly to an object array.&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;Or&lt;/SPAN&gt;&lt;SPAN&gt;, if you have a text file (or just a table, no geometry yet), you can read each line in the file (or row in the table), create point geometry from the read XY coordinates, and load the resultant points into an object array.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So how are the sets defined during iteration?...i.e., when do you stop loading the object array to load the point object set into a feature polygon geometry?&amp;nbsp; By detecting change in the aforementioned n-values read with each row (or, if txt file input, with each line) - when the n-value changes, that's the end of the set.&amp;nbsp; The array load is then interrupted to load the array into the polygon feature's geometry which in turn is inserted into a destination polygon feature class (your output feature table).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The iteration continues on in similar fashion with each successive set... there won't be any n-value change detected on the last set, so the final set will of course load the array but will not be loaded into polygon feature geometry within the loop - this final polygon must be completed outside the loop.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2012 01:49:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268685#M9232</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2012-10-26T01:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: points to polygons</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268686#M9233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I will get back to you either today or Tuesday witha sample data set.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2012 16:03:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268686#M9233</guid>
      <dc:creator>SiranErysian</dc:creator>
      <dc:date>2012-10-26T16:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: points to polygons</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268687#M9234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have attached 2 files, one showing points Reach1B_Banks) but only for part of the stretch of river I am trying to calculate, and the other a line file (Reach1B). Values were not included from the spreadsheet but are included in the cross section line file. I hope the script can handle values in this file. What I need to do is combine the N_values for the left bank, channel and right bank which are in the attribute table as Left_Bank_N, Channel_N and Right_bank_N. These values will determine the&amp;nbsp; changes in flow. The screen shot shows how I connected the dots but Reach 1B point does not have values so I want to use the red lines which have values.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does this make sense? Will it work?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 22:01:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268687#M9234</guid>
      <dc:creator>SiranErysian</dc:creator>
      <dc:date>2012-10-30T22:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: points to polygons</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268688#M9235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, I looked briefly at your attachments and will look further into it when I have more time...probably later today.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would suggest 1st that if you know how to better combine your data, I would write everything to a temp workspace - that way, your orig data is preserved and you hopefully will have intermediate output that's simply easier to work with (or at least appears less complicated).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sounds like you may benefit from either joining, sorting, or otherwise housing the data in a single table?&amp;nbsp; That way, when you go building the geom, you then don't have to go to multiple lookup tables, etc., for attributes if it isn't necessary.&amp;nbsp; I haven't looked into it yet at that detail, but sometimes it's more expedient to work with what scripts you've already experimented with and go ahead if at all possible to 'clean up' or adapt the data accordingly... I'll get back to this shortly.&amp;nbsp; Meanwhile, if you have a breakthrough, certainly post it!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2012 12:55:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268688#M9235</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2012-10-31T12:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: points to polygons</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268689#M9236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay, I've had a chance to get back to this - I haven't done much, just taken a look and attached a couple of files.&amp;nbsp; Looks more like a 2-part problem, that maybe you'd like to 'see' data in a single table?&amp;nbsp; Otherwise the problem statement is as you stated from the beginning to create a polygon based on ordering of FIDs, odd on one side, even on the other.&amp;nbsp; Is there any change to that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Pertaining to the data table, it seems to me you could do a spatial join, to 'combine' or join the line attribute data to the points.&amp;nbsp; Make sure this data is accurate, see the attached.&amp;nbsp; I used the one-to-many option of Spatial Join making the points the target so that you'd be able to 'look' at the data in a single table.&amp;nbsp; Still it is redundant though - you could condense the table further to see a single record for each line (reversing the join, more or less).&amp;nbsp; Anyway, I don't see how this really affects your orig problem creating polygons - have I missed something?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If all is as I understand it, I'll run the solution and attach it tomorrow.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2012 20:11:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268689#M9236</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2012-10-31T20:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: points to polygons</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268690#M9237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I meant to get back to you with this.&amp;nbsp; Basically, it's a demo of IDLE commands that can be refined as you wish into a finished script.&amp;nbsp; All I did was this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Took a subset of your point shapefile as defined in a query on the search cursor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Loaded the point geometry objects into a python list.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- According to the order you wanted based on your input, used the 'device' already described above for 'odd' and 'even' sides.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Resorted the point objects to form the perimeter of a polygon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Created a new row via insertcursor in an existing polygon shapefile into which the point objects are to define new poly geom.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Loaded the result into an object array (thought I could load the py object list directly into the insert row, but that didn't work).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Loaded the object array into the Shape field for the new row.&amp;nbsp; (See the pdf view of the result attached.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the rough code (again, this was done by trial and error within IDLE), see below.&amp;nbsp; If you want to create 1 huge poly out of the point shapefile, you can - simply remove the query.&amp;nbsp; Otherwise, if you want to create individual polygons out of progressive sets of points from the input shapefile, you can set up a looping cursor either based on a common ID code in the point table or redefining your query.&amp;nbsp; Hope that helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;gt;&amp;gt;&amp;gt; import arcpy
&amp;gt;&amp;gt;&amp;gt; arcpy.env.workspace = r'C:\Documents and Settings\whitley-wayne\Desktop\pointsToPolySerysian\Reach1_Banks'
&amp;gt;&amp;gt;&amp;gt; polyArray = arcpy.Array()
&amp;gt;&amp;gt;&amp;gt; where_clause = '"FID" &amp;gt; 1131 AND "FID" &amp;lt; 1148'
&amp;gt;&amp;gt;&amp;gt; inputPts = "Reach1_Banks.shp"

&amp;gt;&amp;gt;&amp;gt; pointsLeft = []
&amp;gt;&amp;gt;&amp;gt; pointsRight = []
&amp;gt;&amp;gt;&amp;gt; points = []

&amp;gt;&amp;gt;&amp;gt; rows = arcpy.SearchCursor(inputPts, where_clause)
&amp;gt;&amp;gt;&amp;gt; for row in rows:
 pnt = row.Shape.getPart()
 points.append(pnt)

&amp;gt;&amp;gt;&amp;gt; for i in range(0,len(points)-1,2):
 pointsLeft.append(points&lt;I&gt;)
 pointsRight.append(points[i+1])

&amp;gt;&amp;gt;&amp;gt; len(pointsRight)
8

&amp;gt;&amp;gt;&amp;gt; pointsRight2 = []

&amp;gt;&amp;gt;&amp;gt; for i in range(len(pointsRight)-1,-1,-1):
 pointsRight2.append(pointsRight&lt;I&gt;)

&amp;gt;&amp;gt;&amp;gt; len(pointsRight2)
8

&amp;gt;&amp;gt;&amp;gt; for eachPoint in pointsRight2:
 pointsLeft.append(eachPoint)
 
&amp;gt;&amp;gt;&amp;gt; len(pointsLeft)
16

&amp;gt;&amp;gt;&amp;gt; cur = arcpy.InsertCursor("testPolys.shp")
&amp;gt;&amp;gt;&amp;gt; feat = cur.newRow()

&amp;gt;&amp;gt;&amp;gt; for eachPoint in pointsLeft:
 polyArray.add(eachPoint)

 
&amp;gt;&amp;gt;&amp;gt; feat.Shape = polyArray
&amp;gt;&amp;gt;&amp;gt; cur.insertRow(feat)
&amp;gt;&amp;gt;&amp;gt; del cur
&amp;gt;&amp;gt;&amp;gt; 
&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:09:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268690#M9237</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2021-12-11T13:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: points to polygons</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268691#M9238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes I get the code. Will need to study it further. Not sure what IDLE is. I would like to use an excel spreadsheet I have with all the values I need: left bank, channel, right bank, as you mentioned above. Will that work? Need to create polygons where values change at each of these locations. I only had points for a short section. None were created for the other sections. I am assuming that no spatial join is needed if I have all the data in an attribute table? Just join the excel table to the line file? Thinking out loud...will get back to you once I study the code a bit more and see if I can make it work on some of the data.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 22:31:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268691#M9238</guid>
      <dc:creator>SiranErysian</dc:creator>
      <dc:date>2012-11-01T22:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: points to polygons</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268692#M9239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;IDLE is simply the interactive editor/debugger app I use to test commands as I am typing each one, sort of like the command window you can now open within ArcMap to execute Python.&amp;nbsp; Basically, if you take out the command prompts&amp;nbsp; " &amp;gt;&amp;gt;&amp;gt; "&amp;nbsp; and a few extraneous print commands, etc., get the indentation right, then you have a working script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not sure I yet understand what form all your data is in...are you saying you have XY coordinate values in Excel?&amp;nbsp; Is there a reason why you have data in multiple forms, or is this because you just haven't assimilated it yet, or is all part of your data conversion process?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, if you have coord vals in Excel, a search cursor can access that directly and assign each coord pair to a point object (in the code provided, the search cursor accessed the point shapefile and captured each point object directly - no need for the XY values).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note:&amp;nbsp; Not sure what you mean by creating polys "where values change" but if you happen to have ID values in Excel as in the input file used in the sample of the Writing Geometries help file, you can use this as your means to loop on a specific set or range of values, breaking the polygons where you wish.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, about the spatial join, I was using that because I thought you were missing a reliable common field on which to make an attribute join.&amp;nbsp; I didn't need this to create the points although it appears this extra data may be needed to define where to 'break'.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 23:30:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268692#M9239</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2012-11-01T23:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: points to polygons</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268693#M9240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your last message and the code. I hope I haven't been sending you around in circles. Here is where I am: I have values in Excel that correspond with the left, channel and right banks of the river. I joined this table to the line file based on a common field. (I am not going to use the point file since the values exist only for a short section of the river and I need the whole). So are you saying that&amp;nbsp; the code will assign coordinates based on those values to a line file with no need for xy values? See attachment of values along the cross sections. Top label is left, middle is channel and bottom is right bank. As I mentioned earlier, where the values change is where the break point would be. Can I substitute the shp file in the code with another and can I substitute lines for points?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there anything else on the code that would have to be revised?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2012 16:27:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268693#M9240</guid>
      <dc:creator>SiranErysian</dc:creator>
      <dc:date>2012-11-02T16:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: points to polygons</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268694#M9241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What I'm saying is, if you have it, you can directly use point geometry (as I last demonstrated) or you can use XY coordinate values if you have that in a table, Excel, txt, or whatever.&amp;nbsp; Or if you can derive those points somehow from the lines - I didn't see how, maybe I'm just being dense, but you know your data better than I.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Only real difference in using coord vals is you'd need to fetch the coord pairs from the table to assign to point objects before loading them in the array (the last sample simply fetches the point objects themselves from the point shapefile).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm slightly confused about 1 thing: what exactly you want polygons to represent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The channel cross-sections bank-to-bank is what the lines represent, correct?&amp;nbsp; But the points shown before were, as I understood it visually, where the 'normal' or main channel is?&amp;nbsp; So you do not want a polygon bank-to-bank but the actual channel?&amp;nbsp; Correct me if I'm wrong in these assumptions, and tell me how these 'channel points' are determined and did I somehow miss that from the table?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;At this point (if the above assumptions are correct), I'm thinking if the 'inner' channel points are related to the measure of the line cross-sections, then the point locations you want to form the channel polygon out of can be derived.&amp;nbsp; Just curious, why do you only have points for part of the channel?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, I can look at this again probably tomorrow and figure it out -- fill me in when you can and we'll solve this quicker.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2012 17:44:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268694#M9241</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2012-11-02T17:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: points to polygons</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268695#M9242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In response to your message: Paragraph 1: I don't have point geometry for all the channel. It was derived from a model only for that section for some reason. So I have to use the values in the cross section lines. Forget about the points. Paragraph 3: The lines represent the cross section of not just the channel but the left and right bank values for flow.(N) The polygons will represent the values from line to line connecting the same values as polygons--for the channel, left bank and right bank. So there will be 3 sets of polygons. You are correct that the points represented the channel but I don't have that data for the rest of the river. Paragraph 4: How do we derive the inner channel or any of the polygons if we don't have xy locations? In the previous correspondence, I was assuming that we could assign coordinated based on some value in the cross section line file? If it is not possible to form polygons for all three areas, left, right and channel, maybe we can just do the channel.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2012 14:12:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268695#M9242</guid>
      <dc:creator>SiranErysian</dc:creator>
      <dc:date>2012-11-05T14:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: points to polygons</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268696#M9243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, I've had a chance to look at this again... unfortunately it's toward the end of the day and I need to test a hunch since I'm not accustomed to this type of data.&amp;nbsp; I'm just touching base with you before proceeding further.&amp;nbsp; I don't think we need to compute anything , at least not for polygon geometry, with the fields pertaining to N values (is this not pertaining to flow?) -- I'm talking about these fields, according to what you attached:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;channel_N2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;leftbandN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rightbank_&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I may have discovered a pattern with these fields (I have to test to see if my hunch is true though.):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LeftBank&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RightBank&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Shape_Leng&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at a single 'strand' cross-section line, say FID 171, with the values LeftBank 0.3254, RightBank 0.41533, Shape_Leng 1641.142808, it seems you can locate the points along the line with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;0.3254(1641.142808) = 534.028 (approx.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0.41533(1641.142808) = 681.616 (approx.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then 681.616 - 534.028 = 147.588&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...and if I carefully measure along that line FID 171 between the points in the shapefile you provided, using ArcMap's measuring tool, I get 147.58792.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I'd say we have a winner algorithm for computing the points - I'll test further by 'chopping' your lines with the points for the segment lengths, make the computation as in the above, and make sure the results closely match the GIS computed length geom segments...pretty sure this isn't coincidental.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From there, I believe there are python methods for getting the 3 polygon sets you ask.&amp;nbsp; Well, it's looking up, what do you think?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2012 20:08:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268696#M9243</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2012-11-05T20:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: points to polygons</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268697#M9244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for touching base. This sounds great! Yes the N values pertain to flow. I would have never thought to look at the shape length. That would be great if the points could be computed with those values. Get back to me once you have tested your hunch.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2012 14:50:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/points-to-polygons/m-p/268697#M9244</guid>
      <dc:creator>SiranErysian</dc:creator>
      <dc:date>2012-11-06T14:50:24Z</dc:date>
    </item>
  </channel>
</rss>

