How can I find which side of a line a point which isnt on the line falls. I have a road and need to see which side of the line a point is so I know which field to pull a value from between R_ESN and L_ESN.

Also, long time no post. The forums are looking snazzy these days!

Also, long time no post. The forums are looking snazzy these days!

But we have Python integrated in ArcGIS and even NUMPY, so anything is possible now!

What you have to do is use the NEAR tool with the option of adding the X,Y coordinates of the intersection with the line.

With this intersection point and the original point you can calculate the side of the polyline using a vector cross product :) You use the sign of the vector product for an indication of left/right. To generate a simplified vector of the polyline for this you will need the lastPoint of the polyline as well, which is easy enough to get from the shape properties. Having the lastPoint gives you the direction of the polyline.

To see how this works, just remember the Right Hand Rule. Hold out your right hand and spread your thumb and first two fingers perpendicular as a 3D axis. If the first finger is the polyline, the second finger the point, then the thumb pointing up (+ve) indicates the point is on the left. Turn your hand upside down so the second finger is on the right, then the thumb pointing down is now negative (-ve).

Numpy has a cross product function (to save us the headache of matrix arithmetic.)

There are a couple of

assumptionsthat are critical for this vector algebra to work as expected.No multipart shapes

No curves

I agree with another poster that these are evil additions to the data model that break most analysis tools.

I haven't written a general tool for this, but it would be a good candidate for the Resource Centre (now deprecated). Maybe ArcScripts could be reinstated?

Competition anyone?