[UW-GIS-L] VBA question: start and end points of lines,
and angles between line segments
Victor C. Van Hee
vvanhee at gmail.com
Fri Apr 11 13:01:30 PDT 2008
I have a polyline file (road network) that I'm trying to automatically
trace down relatively straight segments, carrying forward or smoothing
traffic data which I have from another source.
I've created a network dataset, and I'm using INetworkQuery to get
adjacent segments, then taking the angle between the tangents at the
'from' junction of one segment and the 'to' junction of another. If
the angle between the tangents is small, I'm assuming that the road
continues on. The way I'm doing it seems incredibly complicated, and
I'm wondering if there's an easier way to:
1) Find the start and end points of a chain of segments (end of a
line) programmatically. In ArcView 3.1 there was an Avenue function
called ReturnStart and ReturnEnd, but I can't see anything like that
in ArcGIS 9 (VBA). It might only work for 'routes' in 9 -- but I
can't even see how to do that. I've searched the developer site and
google to no avail. Of course, in my dataset, I don't really have any
variables indicating where a road starts or ends. ArcView 3.1 might
have required this data in its line files -- I've never used it.
2) Get the angle between the end of one segment and beginning of
another without having to formally get the tangents.
The above items would really help make my coding tasks much easier.
If I could find starts and ends without going through every segment,
this program would run about 10000% faster...
More information about the Uw-gis-l