2

I have a dataset with polylines. For some reason the polylines are drawn back and forth multiple times. You can regard the lines as folded. The number of lines the runs back and forth varies from line to line.

I would like to extract the part of the polyline that runs from the startpoint to the folding point, and remove the rest of the lines. We do not know how many vertices there are from the start point to the folding point.

How would you do this in FME?

2
  • 1
    Please Edit the Question to include a graphic to explain your situation.
    – Vince
    Commented Mar 28 at 13:27
  • Sure - that I could do. But a folded line is just a line when you look at it. What kind of "graphics" did you have in mind? Judging from the answers below it seems like the question is understandable.
    – Meatball
    Commented Apr 2 at 7:34

1 Answer 1

2

My understanding is that all the lines coexist in pairs with reversed coordinates

enter image description here

Method 1:

Make sure you expose the fme_feature_type from the Format Attributes list:

enter image description here

This method may or may not work, you can use the DuplicateFilter (previously called DuplicateRemover) and use fme_feature_type as attribute. This is the easy way. Otherwise you may have to convert the lines to points remove the duplicates and rebuild the lines.

enter image description here

Method 2:

Use the TopologyBuilder transformer. If you test it out you will see the following results (Edge output port)

enter image description here

In the table there are 2 attributes, one is the _from_node and the second is _to_node

enter image description here

There are basically the same vertices but one starts and the other ends. The trick was to use a tester and set the following criteria:

_from_node > _to_node

enter image description here

As you can see, the lines have been separated

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.