<?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 GRID, assign ROW/COL index values to each cell in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/grid-assign-row-col-index-values-to-each-cell/m-p/731245#M24103</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry for the cross-post, but the OP in the Python forum is not getting much more attention...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps I am missing the obvious here, but I am in need of (Python, VB or C#) a way to populate ROW, COL field values in a polygon grid. That is, starting at cell 1 (top left) and moving right, set the cell Row, Col values:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Row, Col Row, Col Row, Col &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[1, 1] [1, 2] [1, 3] &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[2, 1] [2, 2] [2, 3]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[3, 1] [3, 2] [3, 3] &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[4, 1] [4, 2] [4, 3]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the same functionality found in the XTools Extension, and yes it works great!&amp;nbsp; However, I need to implement this same functionality in another tool that has additional automation requirements.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help or comments are appreciated!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Sep 2012 12:30:05 GMT</pubDate>
    <dc:creator>JamesCrandall</dc:creator>
    <dc:date>2012-09-24T12:30:05Z</dc:date>
    <item>
      <title>GRID, assign ROW/COL index values to each cell</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/grid-assign-row-col-index-values-to-each-cell/m-p/731245#M24103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry for the cross-post, but the OP in the Python forum is not getting much more attention...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps I am missing the obvious here, but I am in need of (Python, VB or C#) a way to populate ROW, COL field values in a polygon grid. That is, starting at cell 1 (top left) and moving right, set the cell Row, Col values:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Row, Col Row, Col Row, Col &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[1, 1] [1, 2] [1, 3] &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[2, 1] [2, 2] [2, 3]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[3, 1] [3, 2] [3, 3] &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[4, 1] [4, 2] [4, 3]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the same functionality found in the XTools Extension, and yes it works great!&amp;nbsp; However, I need to implement this same functionality in another tool that has additional automation requirements.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help or comments are appreciated!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2012 12:30:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/grid-assign-row-col-index-values-to-each-cell/m-p/731245#M24103</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2012-09-24T12:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: GRID, assign ROW/COL index values to each cell</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/grid-assign-row-col-index-values-to-each-cell/m-p/731246#M24104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi James,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How was the polygon GRID created?&amp;nbsp; Did you use the 'Create Fishnet' tool in ArcToolbox?&amp;nbsp; If not, is there an ObjectID that increments from left to right?&amp;nbsp; And, is there an equal amount of rows and columns?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2012 19:09:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/grid-assign-row-col-index-values-to-each-cell/m-p/731246#M24104</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2012-09-24T19:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: GRID, assign ROW/COL index values to each cell</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/grid-assign-row-col-index-values-to-each-cell/m-p/731247#M24105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi James,&lt;BR /&gt;&lt;BR /&gt;How was the polygon GRID created?&amp;nbsp; Did you use the 'Create Fishnet' tool in ArcToolbox?&amp;nbsp; If not, is there an ObjectID that increments from left to right?&amp;nbsp; And, is there an equal amount of rows and columns?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Jake -- I *can* build the GRID with the Fishnet tool/toolbox.&amp;nbsp; Yes, there is an objectID, but I may or may not increment in that manner.&amp;nbsp; (some polygon layer(s) to be used as input may have been built with Arc/Info fishnet and generate as coverages.&amp;nbsp; But I am attempting to come up with a solution that can be done with existing ArcGIS 9.x and 10.x Toobox tools and custom tools --- however it needs to be is fine with me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I have so far is a messy method of clumisly grabbing Y-Axis to select the upper left polygon, then stores an point for the upper-right and lower-left of this polygon.&amp;nbsp; Then I can move right from the upper-right point (doing a select by location) and move down to the next row using the lower-left point (doing a select by location).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Again -- it's very clumsy and I still have not figured out the exact loop process/requirement.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any additional input is appreciated!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2012 19:45:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/grid-assign-row-col-index-values-to-each-cell/m-p/731247#M24105</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2012-09-24T19:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: GRID, assign ROW/COL index values to each cell</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/grid-assign-row-col-index-values-to-each-cell/m-p/731248#M24106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think a change in approach is needed as this whole selecting by location of polygon extents is very messy.&amp;nbsp; Not saying it is not a viable way to go about it, and I will most certainly be able to utilize much of the code I have developed to this point, but this is just a complex way to go about things that calls for much simpler tactics.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;New thinking is to implement similar functionality as found in the Fishnet Tool but extend it a bit to inlcude some additional automation (populate the Grid cells as we need them to be from my OP). Invoking LABELS, adding row/col columns, calculating these columns with fairly simple formulas and then populating a polygon FC with the values will work just fine and much more efficiently.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 17:57:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/grid-assign-row-col-index-values-to-each-cell/m-p/731248#M24106</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2012-09-25T17:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: GRID, assign ROW/COL index values to each cell</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/grid-assign-row-col-index-values-to-each-cell/m-p/731249#M24107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is an example of some code that I got to work after running the Fishnet tool.&amp;nbsp; I created a two new fields called 'ROW' and 'COLUMN_' and then used the following functions to update them:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;fc = "fishnet"&amp;nbsp; def updateROW(x, y, z, n): &amp;nbsp;&amp;nbsp;&amp;nbsp; while x &amp;lt;= 25: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows = arcpy.UpdateCursor(fc) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row.OID == x and x &amp;gt; y and x &amp;lt;= z: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.ROW = n &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x += 1 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.updateRow(row) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y += 5 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; z += 5 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n += 1 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.ROW = n &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x += 1 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.updateRow(row)&amp;nbsp; def updateCOLUMN(): &amp;nbsp;&amp;nbsp;&amp;nbsp; x = 1 &amp;nbsp;&amp;nbsp;&amp;nbsp; n = 1 &amp;nbsp;&amp;nbsp;&amp;nbsp; while x &amp;lt;= 25: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows = arcpy.UpdateCursor(fc)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = x &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row.OID == y and y &amp;lt;= 25 and n &amp;lt; 6: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.COLUMN_ = n &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y += 5 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.updateRow(row) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x += 1 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n += 1&amp;nbsp; updateROW(1, 0, 5, 1) updateCOLUMN()&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You will need to update some of the variables depending on the size of your Fishnet.&amp;nbsp; The above example is executed on a 5x5 fishnet.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For the updateROW function, the 'while' loop is the total number of polygons, and the 'y' and 'z' increment values are based on the number of rows.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For the updateCOLUMN function, the 'while' loop is the total number of polygons, the 'y' variable in the 'if' statement is the total number of polygons, 'n &amp;lt; 6' represents one less the number of columns, and the 'y' variable is incremented by the number of columns.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only problem with the above code is that it starts at the bottom left corner of the fishnet feature class rather than the top left.&amp;nbsp; You would need to populate a field with values of the OID field in descending value, then use that field in the function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have not thoroughly tested this, and there is a probably a more elegant way to do this, but this may help you get started.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 18:22:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/grid-assign-row-col-index-values-to-each-cell/m-p/731249#M24107</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2012-09-25T18:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: GRID, assign ROW/COL index values to each cell</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/grid-assign-row-col-index-values-to-each-cell/m-p/731250#M24108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your ideas and input!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I came up with formulas for a field calculation process, so not sure how they will relate to looping over rows with an .UpdateCursor --- which I may end up having to use some of your approach below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also: the calcs can start at the Y-Axis cell or the Origin cell depending upon how the actual formula is written.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again and I will keep this thread updated with progress.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;j&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Here is an example of some code that I got to work after running the Fishnet tool.&amp;nbsp; I created a two new fields called 'ROW' and 'COLUMN_' and then used the following functions to update them:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;fc = "fishnet"

def updateROW(x, y, z, n):
&amp;nbsp;&amp;nbsp;&amp;nbsp; while x &amp;lt;= 25:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows = arcpy.UpdateCursor(fc)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row.OID == x and x &amp;gt; y and x &amp;lt;= z:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.ROW = n
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x += 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.updateRow(row)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y += 5
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; z += 5
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n += 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.ROW = n
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x += 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.updateRow(row)

def updateCOLUMN():
&amp;nbsp;&amp;nbsp;&amp;nbsp; x = 1
&amp;nbsp;&amp;nbsp;&amp;nbsp; n = 1
&amp;nbsp;&amp;nbsp;&amp;nbsp; while x &amp;lt;= 25:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows = arcpy.UpdateCursor(fc)&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = x
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row.OID == y and y &amp;lt;= 25 and n &amp;lt; 6:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.COLUMN_ = n
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y += 5
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.updateRow(row)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x += 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n += 1

updateROW(1, 0, 5, 1)
updateCOLUMN()&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;You will need to update some of the variables depending on the size of your Fishnet.&amp;nbsp; The above example is executed on a 5x5 fishnet.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;For the updateROW function, the 'while' loop is the total number of polygons, and the 'y' and 'z' increment values are based on the number of rows.&lt;BR /&gt;&lt;BR /&gt;For the updateCOLUMN function, the 'while' loop is the total number of polygons, the 'y' variable in the 'if' statement is the total number of polygons, 'n &amp;lt; 6' represents one less the number of columns, and the 'y' variable is incremented by the number of columns.&lt;BR /&gt;&lt;BR /&gt;The only problem with the above code is that it starts at the bottom left corner of the fishnet feature class rather than the top left.&amp;nbsp; You would need to populate a field with values of the OID field in descending value, then use that field in the function.&lt;BR /&gt;&lt;BR /&gt;I have not thoroughly tested this, and there is a probably a more elegant way to do this, but this may help you get started.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:12:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/grid-assign-row-col-index-values-to-each-cell/m-p/731250#M24108</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-12T07:12:54Z</dc:date>
    </item>
  </channel>
</rss>

