1

I am new to building custom ArcObjects, and am looking for a custom python script for arcgis version 10 that will loop through a point shapefile to find the nearest line segment of a line shapefile (or multiple if possible) and add the 'NAME' attribute from the line shapefile to a new 'STREET' attribute in the point shapefile.

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Oct 11, 2011 at 20:26

2 Answers 2

4

You should use the Near command. It will create a Near_FID field which is the FID of the nearest Line Feature. Just join on this and you should be able to Calc your points with the closest Line Name. Should be a short script.

answered Oct 11, 2011 at 21:32
1

You could use IProximityOperator::QueryNearestPoint and construct a line from the point returned and the point in your feature class.

answered Oct 11, 2011 at 20:49
2
  • I am no neccesarily interested in the location of the nearest line, as much as the attribute information located in that line segment. If any automation is possible that would be great, as I have about 1000 control points to go through. Thank you! Commented Oct 11, 2011 at 20:59
  • 1
    Ah, then the near tool would work for you, then write a Python script or add a join to line up the data from one feature class to the other. Commented Oct 11, 2011 at 21:27

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.