Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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

share|improve this answer
    
Thanks Williams, it does work for me! thanks! –  Hao Ye Jul 26 '13 at 9:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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