I have point crop yield data that I need to attribute based on planted rows. Is there anyway other then selecting each point in the row and performing a field calculation to achieve this? Or is there a way to automate the selection and attribution process I describe? Currently there is not a field in the attribute table that could be used to identify a point in one row of points vs another row of points.

Any ideas would be much appreciated.

Thanks!

Any ideas would be much appreciated.

Thanks!

The best way that comes to mind it to create a line feature class and draw a single line to represent a starter row on one side of the field that falls within a reasonable distance relative to the first row set of points. Over-bound the set of points at the line ends if the rows are diagonal relative to the field boundaries so that parallel lines will continue to cover the points in the field. Figure out your average spacing and then make a parallel copy of the line spaced apart by that distance. The lines and points do not need to align perfectly, just within a tolerance that won't crossover to another row if the lines were buffered.

Then do a spatial join of the points to the closest line (One to Many option) with a tolerance that is slightly less than one half of the average row separation to get the closest line ObjectID tied to each row of points. The line ObjectID Joined to the points would serve as the RowID for each set of points in a row. This approach should deal with rows of virtually any orientation.

You can then use either the X or the Y plane value (Geometry calculator) that is the most closely oriented to the rows lengthwise orientation to sort and sequence the points from one end of the line to the other within a given row number.

If your row lines can be defined as two-point lines that align close enough to your row points, a python script can probably do the creation of the lines with an insert cursor. It could be based on code similar to the code in this post. Rather than reading a table with a set of origin and destination point coordinates, a starter line's origin and destination coordinates could be initialized, and then the required number of shifted copies could be generated using a for loop that makes standard shifts in the X and Y plane of each new line relative to the last line as a way to generate the parallel lines having the average row spread.

Again, the lines don't have to perfectly align with the points, they just have to be close enough that they would associate all row points to the same line within a tolerance distance of their true position. Locate Features Along Route would be a better alternative then the Spatial Join tool if you want to know the offset distance of each point from each line as a way to isolate the best line for the point if the tolerance could associate the points with more than one line.