I have a uniform point layer generated by using the Regular Points process. My goal is to connect (draw a line to join) a certain number of points in this points layer in a snake pattern.
My current process in PyQGIS works well with horizontal lines, just following the point
"ID"s as I go. It makes it easy to count how many points I've accessed and stop when the limit is reached. However, I am stumped about how I can do this vertically, as the IDs will be fully out of order. Is there a way to force a uniform point field to assign
"ID"s vertically instead of from left to right?
Edit: Horizontal "Snake" pattern here; I would like to achieve the same effect vertically. The snaking line would stop at a given # of points reached; once reached, a new line would start. Repeat until all points are reached.
Edit2: Vertical example. Hand-drawn so doesn't line up that well but hope it does the trick to explain the outcome I have in mind: