Connecting points with lines and creating a new attributes

511
1
02-27-2013 10:26 AM
ChristianMcLellan
New Contributor
Hello,
I am a novice at Python, so I have hit a road block in my work. I want to be able make a script that connect points with lines and then populates a column in attribute table with what points are connected to each other. The picture has an example of what it should look like, and thank you for the help. 
[ATTACH=CONFIG]22226[/ATTACH]
Tags (2)
0 Kudos
1 Reply
CalvinGreen
New Contributor
It is not clear to me what you are trying to accomplish.

Using POINT feature locations to create POLYLINE features is quite simple but I have a few questions if I am to help you.

Firstly, We wont be connecting points with lines as much as we will be creating lines from the point locations


1.  How is the order of the points defined?  In the order they are encountered or by some column such as ptSeq?  (ie. 1,2,3,4)
2.  Will all the points be used to create a single polyline or will there be a column such as lnSeq which will dictate line breaks by a change in value.
3.  In your illustration a line segment 'connects' points 2 and 5 not 2 and 3.  How is this defined or determined?
4.  Are the point features used for any reason other than to create the lines?
5. The point table in your example shows the column to hold the 'points that connect to each other'.  What is is used for?
6.  This would probably be added to the polyline table as well.

Generally when we wish to create polylines we utilize the point XYs, point seq number and the line sequence number to which the point belongs

The table below could be used to create two polylines, one, a straight line from two points and the second polyline from three points

point table
idx    xloc   yloc   ptseq    lnseq   
1                            1          1
2                            2          1 
3                            3          1
4                            4          2 
5                            5          2

If you explain a little more on your input and what you want back I would love to help you
0 Kudos