I have 4 linear features that are all parallel from eachother, and set at unequal spacing from eachother. I am looking to calculate the nearest distance left and right from each linear feature to the next linear feature. Having trouble figuring out how to make this work. Any help is much appreciated
Solved
Calculating Nearest Distance Left/Right Between Parallel Linear Features
Best answer by jdh
I would use a LeftRightSpatialCalculator with your features sent to both base and candidate to get a relative position list of which features are to the left vs right (the current feature will be undefined) - you need a Key attribute for this.
Then a neighborfinder (candidates only) with the Close Candidate list (for your specific case you can set the number of neighbours to 3, in a more generic case the number of neighbours should be the maximum number of candidates on a side +1, I would use a list histogrammer on the relative position list to determine that.)
You can then go through the close candidate list to get the Key ID of the closest feature and then check the relative position list to see if it's left or right. Keep going through the close list until you find both a left and right, or reach the end of the list (one feature will have no left, and the other no right)
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.