Arrange points by x and y and create tree for each row

Have you looked at this?

The result is one tree with multiple branches containing horizontally sorted points.

Is that not what you’re looking for?