2

Any ideas on ways to select line features that have an endpoint/node within a distance of a point feature class? I have been using arcpy.SpatialJoin_analysis and arcpy.SelectLayerByLocation_management to achieve selecting all lines that fall within a specified distance of a point feature class; though, I want to make sure I do not capture lines that may fall within the search radius of a point but do not have and endpoint within the same search radius (e.g. just passing nearby within the search radius). I don't see this type of selection as a built in function for either arcpy.SpatialJoin_analysis or arcpy.SelectLayerByLocation_management, but I may have missed something. This would be a very useful functionality if it exists.

3
  • 1
    Do you have an advanced license? Are you looking to create a model or script to do this at need or just once interactively? Jun 12 '17 at 21:55
  • @MichaelMiles-Stimson I do have an advanced license and am looking to add this functionality to a script. Jun 12 '17 at 22:46
  • Hornbydd has the correct answer. Use Feature Vertices to Points to get the endpoints (advanced license, use BOTH_ENDS option) then select the end points that are in your buffer, switch selection and then delete features to leave only the endpoints close enough then attribute join the source lines to the endpoints with OID/FID to ORIG_FID and select where OID/FID = ORIG_FID... done! The use of OID/OBJECTID/FID depend on your source line feature type. Jun 12 '17 at 23:11
4

You do not state what your license level is, you should always state that as that dictates the solution.

If you have an Advance license then you can extract the end points using Feature Vertices To Points tool, then do your select by location and relate the selection back to your lines.

If you do not know what I mean by relate then read the help page titled "Relating the attributes in one table to another".

1
  • I do have an advanced license and 'Feature Vertices To Points' may be just the ticket. Thanks a bunch! Jun 12 '17 at 22:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.