I have a dataset of projects (lines) and markers (points) as shown in the image below. I need to update the projects dataset so that the closest IDs to the start/end point of the projects are included in the attribute table as 'StartID' and 'EndID'. How would I approach this?
The following steps can get what you need or pretty close to what you need:
1. Run Feature Vertices To Points tool with Start Point option on your lines. Let's name the output StartPts, which carries the line FIDs in ORIG_FID field. Repeat this with End Point option; name the output EndPts.
2. Run Near tool on StartPts with your marker points as the Near Features. Specify a reasonable Search Radius if necessary. And replace the default NEAR_FID with START_MKFID (start marker FID). You will get a new field START_MKFID with the marker points FIDs. Repeat this for EndPts to get a new field END_MKFID.
3. Run Join Field tool to join StartPts with the lines and transfer START_MKFID to the lines. Repeat this to join EndPts with the lines and transfer END_MKFID to the lines.
Hope that helps.