To get FME to identify the dangles, I used the Workbench to define the following transformation.
The steps are described below.
- Start the FME Workbench and open a blank workspace.
- Select Source Data > Add Dataset to add in a source dataset.
For this example, I added in a ESRI shape file as the source dataset.
- Select Destination Data > Add dataset to add in a destination dataset.
I chose to output the dangle flags as ESRI Shape point file.
- Drag and drop the following transformers onto the workbench:
- CoordinateFetcher (2 times)
- GeometryRemover
- 2DPointAdder
- Matcher
- Connect the transformers with the source and destination datasets as shown below.
- Open up the first CoordinateFetcher's properties.In the Index field, type in 0. Click OK.
Note: this transformer will extract the line work's first vertex into the fields _x, _y, and _z.
- Open up the second CoordinateFetcher's properties. In the Index field, type in -1. Click OK.
Note: this transformer will extract the last vertex of the line feature into the fields _x, _y, _z.
- Open up the 2DPointAdder transformer's properties. In the X-Value field, choose _x. In the Y-Value field, choose _y. Click OK.
Note: the 2DPointAdder will create a new point from the _x and _y fields.
- Open up the Matcher transformer's properties.In the Match Geometry field, choose 2D.
Note: In this example, in the Attribute(s) to match field, I chose _x, _y but this is redundant because the 2D point geometry already has the _x and _y coordinates. This field can be left blank.
- Run the translation.
The dangles are created and flagged as red crosses below.
No comments:
Post a Comment