In_features for Near_analysis

734
3
04-12-2011 09:21 AM
JoelCappello
New Contributor
I'm attempting to find the closest junction to the end points of my existing lines. i.e,. I'm using the lastpoint and firstpoint for input_features of my near_analysis and another junction (points) for my near_features. Is this possible? I can't find any documentation. Any ideas how?

Thanks.
Tags (2)
0 Kudos
3 Replies
DarrenWiens2
MVP Honored Contributor
Not sure what your question is - this sounds exactly like what Near is supposed to do.
0 Kudos
JoelCappello
New Contributor
The documentation calls for a a feature layer of type Point, polyline, polygon or multipoint. I know that some geoprocessing tools will let you supply a geometry for input and a object for output, such as obj = arcpy.near_analysis(pPoint,junctionLyr). The error message I'm getting is telling me that my in_features is of the wrong type when I provide a point object. I suspect that the tool wasn't designed to work that way.
0 Kudos
DarrenWiens2
MVP Honored Contributor
But you have an input feature layer (the end points of your polylines). If you don't have that, use the Line to Point script (not exactly sure what it's called - my ArcGIS is in the process of crashing) to get the end points. That gives you your input feature class, on which you use Near to get the ID and distance to the closest junction.

Edit: it's the Feature Vertices to Points tool, Point Type = BOTH_ENDS
0 Kudos