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 working on a small script using ArcMap10/arcpy to generate a upstream-downstream uniqueid for a polyline feature class using point id's that fall on the starting point and ending point of a line.

For example, if pt with an id of DEIRS00120 is located at the starting point of a line and if a pt with an id of DEIRS00125 is located at the end point of the line, I would like to assign the line the uniqueid of DEIRS00120-DEIRS00125.

My problem is that I need some ideas on how to accomplish this.

Here's what I thought would work: 1. Generate a python dictionary using the point id's as a value and the XY location as key: {'123456.765,827393.613737': 'DEIRS00120' } 2: Generate another python dictionary containing the XY Start Point location of the polyline as a key and the objectid as a field: {'123456.765,827393.613737': 1} Do the same for the XY End Point. 3: Call the ids of the points using the start and end location of the line.

What flubbed this thinking up is that if line branches, the start points (or end points) are the same at the branch and cannot be used as a python key.

Any ideas on how I could accomplish this?


share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.