Select to view content in your preferred language

Calculate fields: sequential numbers needed in alternating pattern for points along a grid

128
1
Saturday
Labels (2)
SusanWS_nysm
Occasional Contributor

Good morning!

I have a point feature that represents samples taken in the field along a 20m x 20m grid every 1 meter (the data collected in the field exists in tabular form with no geometry). Beginning with the first line in the southwest corner of the grid, Line 1 was walked south to north; Line 2 was walked north to south, and so on and so on. Each sample in the table has a sequential number ID and to make use of this info in ArcGIS, we need to join the table to the points.

There are 21 points in each line (samples were collected on the baseline or Row 0) and the point attribute table has a field indicating which line the point resides). 

I *think* there is a way to add the corresponding IDs using the calculate field (in the currently empty ID attribute column) and python in the code block, but I cannot figure out anything (yet) that is working.

Any assistance would be greatly appreciated,

susan

Addendum: it also just occurred to me after writing the above that performing a spatial sort using the LL (lower left) might the simplest & quickest solution.

0 Kudos
1 Reply
DuncanHornby
MVP Notable Contributor

Sounds like you asking to do serpentine numbering? A Q&A for such an approach can be found on GIS SE. The logic is captured as SQL and goes from left to right, but you might be able to re-jig the logic into a python script so is start lower left and goes from bottom to top.

 

p.s. Such a question is often best accompanied with a sketch of what you want, suggest you edit your question and add that.