Answers for "Point Attribute copied Over to Line Attribute, closest point to beginning of line" https://knowledge.safe.com/questions/104166/point-attribute-copied-over-to-line-attribute-clos.html The latest answers for the question "Point Attribute copied Over to Line Attribute, closest point to beginning of line" Answer by erik_jan https://knowledge.safe.com/answers/104295/view.html

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.

Wed, 11 Dec 2019 17:54:26 GMT erik_jan
Answer by bwn https://knowledge.safe.com/answers/104192/view.html

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.

Wed, 11 Dec 2019 03:20:45 GMT bwn
答案由danullen https://knowledge.safe.com/answers/104175/view.html

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.

星期二,2019年12月10 19:17:16格林尼治时间 danullen