Calculating Grid square page names using loops, counters/cursors [duplicate]

المشرف العام

Administrator
طاقم الإدارة
This question already has an answer here:


I've created a large grid of 1 sq-mile cells to use for QC projects at my job. I've given each row a letter ID, and each column a number ID. So the grid starts with A01, goes to A02, etc. Next row starts at B01, B02, B03, etc. I'm using the fishnet tool in arcgis 10.2.

For the purpose of producing handout maps I've created a sub-grid that subdivides the master grid above into 9 equal sections. So like grid square A01 will have 9 smaller cells within it - A01 NW, A01 N, A01 NE, A01 W, etc.

What I'm struggling with is figuring out how to programmatically assign these names to the sub-grid squares. I would just run through it manually but there are over 7000 squares!

The OID is all over the place so its no help, but I have created a field where I have numbered each subgrid square like this:



So each subgrid square starts getting numbered at the top left and ends at the bottom right. I'm trying to figure out how I could use this field I've made to my advantage. Unfortunately I'm a programming newbie so even though I know there is probably a straightforward way to do this with looping / iterators somehow, I'm stuck. Every function I've tried to put together in field calculator throws up errors no matter what I try.



أكثر...
 
أعلى