1

I am currently doing an analysis in ArcMap 10 using python.

I have two shape layers, one is a point layer and the other one is a line layer. The point layer have attributes for point's unique ID, as well as X and Y coordinates (expressed as coord_X, coord_Y). The line layer include line's ID, and its has coordinates for starting point and ending point. Here they are expressed as FromID_X, FromID_Y, ToID_X, ToID_Y. There are also two empty column in line layer's attribute table as FromID and ToID for points.

All coordinates in both point and line layer are already know by field calculation, but the FromID and ToID of starting point and ending point in line layer is empty. I want to figure out the ID of point from point layer and fill them in the table of line layer, i.e. FromID and ToID.

I have an idea to compare the coordinates of FromID_X (line's layer) with Coord_X(point's layer), if they are the same, output the Point's ID to line layer as FromID and repeat this for ToID.

But now, I am not familiar with python in ArcMap 10, I am wondering if you can tell me some idea or grammar which I can look into so I could use python in ArcMap to do this work? Or you know some tools for such kind of work?

1 Answer 1

1

You could join the features by attributes, select matching x, then calculate field.

0

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.