The NeighborFinder will do this for you. To be sure that it doesn't catch the wrong line you could either trim down the length of the line or use a CoordinateExtractor and a VertexCreator to create a new point on the beginning of the line. That point will inherit the attributes from the line and they can then be transfered to the DrillHole point with the NeighborFinder.
Similar methodology as danullen's, the only variation is that can use a single Snipper transfomer (in Vertex Mode with the FromVertex Index=0 ad the ToVertex index=0) to get the Drill Line end points rather than a CoordinateExtractor+VertexCreator combination, but in my performance testing they both execute in about the same time so in outcome basically identical.
You can also make the points and lines obey an explicit spatial relationship by first snapping the Points to the Ends of the Lines using AnchoredSnapper in End Point mode.
Then SpatialRelator can pull the Drill Point ID across to the Lines: Lines as the Requestor and the Points as the Supplier with Predicates of where Requestor Touches Supplier (A line "touches" if it is the end point only that intersects the shape it is being tested against). It is more expensive to execute, but if you wanted to use further Transformers beyond your immediate problem where later in the Workspace it becomes more convenient if the underlying geometries are snapped together and intersect precisely on the line end points, then this can work well too.
Similar methodology as danullen's, the only variation is that can use a single Snipper transfomer (in Vertex Mode with the FromVertex Index=0 ad the ToVertex index=0) to get the Drill Line end points rather than a CoordinateExtractor+VertexCreator combination, but in my performance testing they both execute in about the same time so in outcome basically identical.
You can also make the points and lines obey an explicit spatial relationship by first snapping the Points to the Ends of the Lines using AnchoredSnapper in End Point mode.
Then SpatialRelator can pull the Drill Point ID across to the Lines: Lines as the Requestor and the Points as the Supplier with Predicates of where Requestor Touches Supplier (A line "touches" if it is the end point only that intersects the shape it is being tested against). It is more expensive to execute, but if you wanted to use further Transformers beyond your immediate problem where later in the Workspace it becomes more convenient if the underlying geometries are snapped together and intersect precisely on the line end points, then this can work well too.
Thank you for the reply and advice. I think this is more what I'm looking for as, when I ran the other method, I was getting some traces picking up the same hole ID. HoleID should be unique for each trace. I will give this a shot.
The NeighborFinder will do this for you. To be sure that it doesn't catch the wrong line you could either trim down the length of the line or use a CoordinateExtractor and a VertexCreator to create a new point on the beginning of the line. That point will inherit the attributes from the line and they can then be transfered to the DrillHole point with the NeighborFinder.
Thank you for your reposne. This works for me, albeit it needs some tweaking to ensure each trace gets a unique HoleID, this has been a good start for me. I will try what BWN said above and see if that helps. Appreciate the response!
Another option would be:
Store the line geometry in an attribute (GeometryExtractor).
Replace the line by its starting point (VertexCreator).
Find the closest point to the start points (NeighborFinder).
Replace the starting points (That now contain the attribute from the Drill) by the stored line (GeometryReplacer).
Hope this helps.
Another option would be:
Store the line geometry in an attribute (GeometryExtractor).
Replace the line by its starting point (VertexCreator).
Find the closest point to the start points (NeighborFinder).
Replace the starting points (That now contain the attribute from the Drill) by the stored line (GeometryReplacer).
Hope this helps.
Thank you! I will try this failing the other methods. I think this would be a better option than shortening the line and would ensure Unique value for each trace.