Relate first point and last point of polyline to point feature(s)

المشرف العام

Administrator
طاقم الإدارة
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?

Thanks



أكثر...
 
أعلى