Creating expanded network from points?

638
5
Jump to solution
06-27-2017 01:54 AM
StanleyYin
New Contributor II

I have a set of points as shown in the picture below. What I want to do is to create a series of crisscrossing lines like the second picture below. Is there any way to do this without having to resort to manual line-drawing? I have tried many ways from the "points to line" function to fishnets, but none of them seem to work! Any tips to make this easier would be much appreciated too! Thanks!

0 Kudos
1 Solution

Accepted Solutions
AbdullahAnter
Regular Contributor II

There is an easy solution but with many steps.

Frist , you will measure the  diagonal line between the two  closer points. (as the picture ).

2- Use Add XY Coordinates to your point feature class .

3- Use Spatial Join and make the join feature class and target feature class is your point feature class (same layer). and Join operation one to many , and match option within a distance and the distance is the diagonal distance the measured in step 1.( as the picture)

4-After Join we should delete the join with the same point , so we will go to attribute table and make a query ("TARGET_FID" = "JOIN_FID") to select those points then delete them. (as the picture)

5- The main operation in this solution is using XY To Line tool. and define Start X field and Start Field as the x and y coordinates of target fields and End X field and End Field as the x and y coordinates of Join fields (Vice versa). and define same spatial reference.

6-Finaly , you will get the square and diagonal lines. as you want. But you will need to Use Dissolve tool, to remove the duplicate lines .

View solution in original post

5 Replies
DanPatterson_Retired
MVP Esteemed Contributor

How are your points generated? The method of constructing them could be exploited to assist in connecting the points.  Using the nearest X points will fail in many corner cases unless a specific rule set is used to ensure that once a line is formed, that point is removed from the candidate list of points to connect to.  I wrote some base code to make point connections but I hadn't considered this possible use, so even it fails since the algorithm is based on connecting the closest but not with removal once it has been used 'n-times' (if you want to pull out some of the base code to modify, it is here )

StanleyYin
New Contributor II

The points were created by generating tessellations (square) and converting them into points. I am actually trying to replicate an expanded network grid for a continuous space siting problem in vector format. I can easily create the square grid lines but have had difficulty creating the diagonal lines. Thanks for the link though, I'd see what I can do with it!

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

I thought about a simple Delaunay triangulation but that will only return one of the diagonals.  I couldn't get consistent results using the code link I posted, that is why I thought of modifying the base code to form the diagonals in a predictable fashion.  Have a go yourself if you want, and I will think on it some more.

0 Kudos
AbdullahAnter
Regular Contributor II

There is an easy solution but with many steps.

Frist , you will measure the  diagonal line between the two  closer points. (as the picture ).

2- Use Add XY Coordinates to your point feature class .

3- Use Spatial Join and make the join feature class and target feature class is your point feature class (same layer). and Join operation one to many , and match option within a distance and the distance is the diagonal distance the measured in step 1.( as the picture)

4-After Join we should delete the join with the same point , so we will go to attribute table and make a query ("TARGET_FID" = "JOIN_FID") to select those points then delete them. (as the picture)

5- The main operation in this solution is using XY To Line tool. and define Start X field and Start Field as the x and y coordinates of target fields and End X field and End Field as the x and y coordinates of Join fields (Vice versa). and define same spatial reference.

6-Finaly , you will get the square and diagonal lines. as you want. But you will need to Use Dissolve tool, to remove the duplicate lines .

View solution in original post

StanleyYin
New Contributor II

This worked fantastically! Thanks so much for taking the time to come up with this!