I will suck at explaining this, but here is my attempt.
Also, I am managing with a small laptop screen right now - not able to get very clear screenshots of the workflow-so skipped it.
P2 Approach:
Step 1: Split the digging input into two streams - i. Up & Down (Row Movement) ii. Left & Right (Column Movement)
Step 2: Retaining the digging order, generate next (Row,Column) point using Multi Row Formula for each stream.
Step 3: Union all the generated points together and order them by digging order. Using multi-row formula, populate the next (Row,Column) Point. The next point for the last point will be the first point.
Step 4: Using the current and next point, generate all the points that make up the perimeter. (I split the input into four streams based on the direction of digging and then used multi-row)
Step 5: After all the perimeter points were generated, I built a sequence polygon using poly-build tool.
Below is the main logic :
Step 6: I first ordered all the perimeter points by Row ID Asc, Col ID Asc. Like 1,1; 1,2; 1,5; 1,6; 2,1; 2,6; etc.......
Step 7: Then for each column within a row, I determined the next available column (within the same row) - consider only perimeter points. Like 1,1-1,2; 1,2-1,5; 1,5-1,6
Step 8: Count points between each pair of perimeter points created in the previous step - For 1,1-1,2; 1,2-1,5; 1,5-1,6, it would be 0,2,0
Step 9: Using the first perimeter point from each pair calculate the immediate next point on the right - Example - 1,1 - 1,2; 1,2 - 1,3
Step 10: Now using spatial match check whether the newly generated point lies in the polygon area using spatial match, if it does the counted points between the pair of perimeter points should count towards the total area otherwise, they should be discarded.
Step 11: To the above, add the total count of the perimeter points and that's the total area!
