I have a single point featureclass that represents the left and right sides of a landform (the points are coded as either 'right' or 'left'). Visually I can pick out and digitize two lines along these points, however, I need to do this automatically using ArcObjects or calls to geoprocessing functions in Arc10.
The figure below shows the two separate lines that I want to automatically select (in red).
It is not as easy as selecting by attribute (e.g. 'right') and using Point to Polyline since there is no guarantee that these points are collected in order - the output polylines often jump all over the place.
Using a bounding polygon (see figure again) I have attempted to: 1) Split the polygon into lines at its vertices. 2) Select by attribute on the points (e.g. 'right). 3) Select by location on the polylines where they intersect the selected points.
The issue with this is I end up with extra lines selected as the points at the top of each desired line intersect with the "top" and "bottom" lines of my polygon.
Am I overthinking this? I just need to select the two longest 'sides' of the irregular polygon. Eventually I need to batch process this task on many point featureclasses, so they may not be as clear-cut/spaced as the above example.
EDIT: My desired output is a polyline featureclass containing the two separate polylines coded as right and left, respectively.
Answer
Not to be meant as a serious complete answer, but rather just an idea to toss around - I wonder if Thiessen polygons could perhaps be of any use in this case.
Now, the trick is to find a reliable algorithm to identify those polygon boundary segments which form the centerline. Once you have the centerline, it is easy to decide on which side a point lies. Any ideas?
As a side note: I know this should be a comment, not an answer, but since you cannot post uploaded images in comments, I figured I'd dare to make an exception.
No comments:
Post a Comment