Distinguishing lines that connect different type of points

10-07-2016 09:08 AM
New Contributor III

How can I find those lines that connect only different points as shown in the figure? Using Model Builder. The points are in several layers, each one stands for different level visualized with different colors. However, the lines, are only one layer.


0 Kudos
4 Replies
New Contributor III

And I have the point-layers in one layer as well with a field that recognize each type of them.

0 Kudos
New Contributor III

I used the tool "select by location" and it's solved. Thanks

0 Kudos
MVP Alum

Another way to do this if you have many points and lines to process is the following:

1).  Make sure the point feature class has a field in the attribute table that differentiates the red and green dots, like Type or Class.  Also, make sure it has a Point ID field with unique ID's for each point.

2).  Make sure the line feature class has a Line ID field with populated with a unique value for each line.

3).  Create points at the start of each line.  Then create another point feature class to create the points at the end of each line:

-  If one has an Advanced License, use Feature Vertices to Points (Data Management)Point Type (optional) is Start or End

ArcGIS Help (10.2, 10.2.1, and 10.2.2) 

- If one has a lower license level, there is a workaround:

How To: Create a start, midpoint, and/or endpoint feature class of a line with an ArcGIS for Desktop... 

4).  Spatial Join the the original points to each of the point outputs from step 3.

5).  For the resulting point file with End points, add an EndPointID field.  Calculate the Point ID to this field.

6).  For the resulting point file with Start points, add an StartPointID field.  Calculate the Point ID to this field.

7).  Next, use an Attribute Join to add the Start Points to the Lines based on LineID.

8).  Do a second Attribute Join to add the End Points to the Lines in step 7.

9).  Export the resulting file to create a new feature class with the joined information permanently part of it.

10).  Remove all the extraneous fields (there will be several added by all the processing). 

11).  The end result will be a line feature class that includes in its attribute table the start and end point classifications.  To find the ones that are disparate, do a Select By Attributes StartPointClass <> EndPointClass.

Chris Donohue, GISP

New Contributor III

Thanks Chris, smart thinking. I went through a hard method to do it for each one. Thanks once again.

0 Kudos