span8
span4
I'm looking for a workflow suggestion or a transformer suggestion. I'm a light user of FME and I have Drill Traces, 3D Polyline files, that are missing their DrillHole ID. I have a DrillHole point file with the correct HoleID in it. The DrillHoles are typically within 0.02m of the beginning of the drill trace. I'm looking for a way to populate an Attribute added to the Drill Trace file to add the Hole ID to it. Both files are Shapefiles. I have attached a screen shot showing the Drill Hole and the Drill trace. I have about 7000 of these I need to match so doing it manually is not an option. Is there a proximity transformer or something that will pull the Hole ID into an attribute into the Drill Trace file from from the Hole point file that is closest to the beginning of the trace? Thank you!
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.
Another option would be:
Store the line geometry in an attribute (GeometryExtractor).
通过其起始点(顶点)更换该行。
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).
希望这可以帮助。
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 Safe Software Inc |合法的