Much thanks to: Bill Huber, Joe Rivlin and Ianko T. Ianko and Joe both pointed me towards applications that they have developed/are working on developing. Bill outlined a method that uses the PointPosition command to assess the min and max point position of the polygon points along the respective line. I'll be using his guidance to workout the remainder of this script, so that this may be automated and run on several lines/buffer-polygon intersections. I have included Bills detailed response below. It includes my original question, so I won't restate that except in Bill's response. Again, thanks! Brad Oleson **********************************Response********** Brad, At 04:15 PM 10/2/01 -0400, you wrote: >I have a question that is better explained using an image with words, so I >have created the following web page that shows what I need to do - >http://bdogwd.homestead.com/ArcViewQ.html Well done! >I need to have ArcView create the two lines that run perpendicular to a >buffered line. The perpendicular lines need to be created by drawing a >line from the 2 farthest points in the clipped polygon (green hashed poly, >in the image on web page). I will then be using the perpendicular lines >to split the main line. Here are some thoughts. Your data consist of the line, the buffer distance, and the hashed green region. Let's call them L, d, and R, to be specific. If I have understood correctly, you want to intersect R with the buffer of size d around L (call this resulting region R'), then erect perpendiculars to L that exactly "contain" R'. Finally, you want to break L at the perpendicular locations. One approach is to squash R' up onto L so that all computations become one-dimensional. The squashing is surprisingly easy to do, as in the following sketched procedure: Given: Region R' and polyline L. Algorithm: Represent R' as a list of lists of points. Replace each point P in this representation by L.PointPosition(P). Retain only the minimum and maximum observed values of L.PointPosition(P) during this process. The output is A0 and A1, where A0 is the minimum PointPosition value and A1 is the maximum. (These are percentages of distances along the line). Finally, cut the line at L.Along(A0) and L.Along(A1). In sum, then, the approach is: Begin Compute the buffer of size d around L. Intersect R with the buffer to get R'. (If R' is null, then quit.) Compute A0 and A1 as above. Cut L at L.Along(A0) and L.Along(A1). End This approach does NOT assume the line is perfectly straight. If it is, then there is a faster way. The idea is to rotate and shift the whole picture so that L is a horizontal line lying along the x-axis. The computations become fast and easy in this situation. After solving the problem there, just back-transform the solution: Begin Compute an affine transformation A that makes L parallel to the X-axis and coincident with it. Apply A to the endpoints of L (call the x-coordinates of the results p0 and p1) and to R (call the result A(R)). Form the rectangle having lower left corner at p0@(-d) and size (p1-p0)@(2*d)). (This is the buffer.) Intersect this rectangle with R (use R.returnClipped); call the result R'. (If R' is null, then quit.) Let A0 be the left coordinate of the extent of R' and let A1 be the right coordinate. Form lines from p0@0 to A0@0, A0@0 to A1@0, and A1@0 to p1@0. Back-transform these lines (use the inverse of A). These are the three parts of L you wanted. End The only part that is not completely straightforward is the first step: computing the affine transformation. If the original endpoints of L are Q0 and Q1, however, then calculate Q = Q1 - Q0, e = (0@0).Distance(Q), and let x = Q.GetX/e, y = Q.GetY/e. The INVERSE of the desired transformation will have matrix elements x, -y, Q0.Getx, y, x, Q0.Gety, 0, 0, 1 So create the inverse directly (Transform2D.SetMatrixElements) and invert it to compute A. Save the inverse for the last step, though. --Bill Huber Bill Huber Acting Editor Directions Magazine http://www.directionsmag.com bill.huber@directionsmag.com