Question

TopologyBulider split overlying lines into individual features even when assuming clean data.


Badge

I have lines with nodes at the ends of each line (classic node-edge-topology). For my export I need the from- and to-node of each line. To add the node-information to the lines I use the TopologyBuilder what works great in most cases. The problem I have is shown in the two screenshots below. If I two or more lines are overlapping the TopologyBuilder split the second line into individual features. How can I avoid that? It destroys my topology. (I'm working with FME2018)

Data before TopologyBuilder:

Data after TopologyBuilder:


15 replies

Userlevel 4

Do you not have an attribute that would be suitable for Group By?

Userlevel 3
Badge +18

I don't think the TopologyBuilder is the Transformer you wan't to use, because i understand that you don't wan't your lines to be changed.

You could use the CoordinateExtractor and VertexCreator to Create Nodes for Each line.

Badge

Do you not have an attribute that would be suitable for Group By?

Unfortunately not. In some cases is also a node missing and TopologyBuilder create it for me. This is very nice. But the described problem is very nasty. Do you know any workaround?

 

 

Badge +3

wel, create a id for the lines to use as group by. For instance wit a counter.

Badge

I don't think the TopologyBuilder is the Transformer you wan't to use, because i understand that you don't wan't your lines to be changed.

You could use the CoordinateExtractor and VertexCreator to Create Nodes for Each line.

The point is I have already the most end-nodes for the lines as existing features, but I need to identify the right one and add the name of the node to the from- or to-node attribute of the line. In case no node is existing I need to create a new node. Till now the TopologyBuilder is doing this for me. Is there a possibility to solve it differently?

 

 

Badge

wel, create a id for the lines to use as group by. For instance wit a counter.

This solves my initial problem but crates a new one. The TopologyBuilder creates for all the line-endings new nodes instead of using the already existing node-features... Is there a way to go through the list of lines one by one?

 

 

Badge
This solves my initial problem but crates a new one. The TopologyBuilder creates for all the line-endings new nodes instead of using the already existing node-features... Is there a way to go through the list of lines one by one?

 

 

Additionally I realized that this way the TopologyBuilder start the index for the from- and to-node for every cable new. So I get allot of index 1 and 2 nodes... This is not helpful...

 

 

Userlevel 4

You may want to experiment with setting "Assume clean data" in the TopologyBuilder. Note that with this setting activated you will have to create the start/end nodes yourself, but at least it won't intersect your lines. Have a look in the help for more information on this setting.

It's easy to create nodes using e.g. two CoordinateExtractors with index 0 (start) and -1 (end) and a corresponding VertexCreator to create a new point feature from those coordinates.

Badge

You may want to experiment with setting "Assume clean data" in the TopologyBuilder. Note that with this setting activated you will have to create the start/end nodes yourself, but at least it won't intersect your lines. Have a look in the help for more information on this setting.

It's easy to create nodes using e.g. two CoordinateExtractors with index 0 (start) and -1 (end) and a corresponding VertexCreator to create a new point feature from those coordinates.

Although I set "Assume clean data" to "yes" the TopologyBuilder splits overlapping lines apart and creates individual features (as shown in the picture in the initial post). This is my big problem. Is there any other possibility to get the from- and to-node attribute to the line feature?

 

 

 

Userlevel 4

Have a look at the attached template demonstrating setting "Assume clean data" to Yes.

Notice that intersecting lines are not split by the TopologyBuilder when using this setting.

topobuilder.fmwt

Badge

Have a look at the attached template demonstrating setting "Assume clean data" to Yes.

Notice that intersecting lines are not split by the TopologyBuilder when using this setting.

topobuilder.fmwt

Thank you for your example. I made a small modification to explain my problem. Line 3 and 4 are overlapping with two vertexes at the same spot. The TopologyBuilder splits line 3 and 4 each in three individual features although "Assume clean data" is set to "yes".

 

topobuilder-modified.fmw

 

 

Userlevel 4
Thank you for your example. I made a small modification to explain my problem. Line 3 and 4 are overlapping with two vertexes at the same spot. The TopologyBuilder splits line 3 and 4 each in three individual features although "Assume clean data" is set to "yes".

 

topobuilder-modified.fmw

 

 

Thanks, that's explains it. I'm guessing this is because of the shared vertices.

 

In your place I would be tempted to send the case to Safe support (if you do, link this thread).

 

Meanwhile, it should be possible to manually create the to-from node relationships, although it's going to be a bit of work.
Badge
Thanks, that's explains it. I'm guessing this is because of the shared vertices.

 

In your place I would be tempted to send the case to Safe support (if you do, link this thread).

 

Meanwhile, it should be possible to manually create the to-from node relationships, although it's going to be a bit of work.
Ok, I will do this... Unfortunately, this didn't solve my problem... Can I slightly move shared vertexes? Do you know any possible way as a workaround?

 

 

Userlevel 4
Ok, I will do this... Unfortunately, this didn't solve my problem... Can I slightly move shared vertexes? Do you know any possible way as a workaround?

 

 

I suspect the easiest is to manually construct start/end nodes (as in the template above), remove duplicate nodes (Matcher), give them a unique id (counter) and then find the node id under each start/end vertex (NeighborFinder).

 

Shouldn't be too complicated, actually.
Badge

This thread was helpful to find the from- and to-nodes for each line without the TopologyBuilder: https://knowledge.safe.com/idea/38472/neighbourfinder-possibility-to-use-start-and-endpo.html

Reply