I have a point layer of 64 points.
Now I want a point-to-point linkage line layer containing 64*64=4096 lines.
Is there a way automatically do that?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityI have a point layer of 64 points.
Now I want a point-to-point linkage line layer containing 64*64=4096 lines.
Is there a way automatically do that?
Actually I've come up with an approach myself. It's a little bit tricky.
First, use "Point Distance" tool to create a point-to-point matrix. There will be "Input_ID" and "Near_ID".
Second, in the matrix, create "From_Lat", "From_Lon", "To_Lat", "To_Lon", representing the XY coordinates of each link line's start and end point.
Third, join the point layer to the matrix table that point ID matches "Input_ID". Then calculate "From_Lat" and "From_Lon" equal to the point layer's lat and lon.
Forth, de-join and re-join. This time point ID matches "Near_ID" and similarly, calculate "To_Lat" and "To_Lon".
Last, now we have the coordinates for start and end point. Simply run "XY to Line" tool and bingo, we have the link line layer with 64*64-64=4032 line features.