Question

Point extraction and line joining

  • 27 July 2017
  • 9 replies
  • 10 views

Badge +1

Hello,

 

 

please, I have one issue to solve. I have topology with junctions and nodes. In that topology there are two types of nodes - type A and type B. What I need is extraction of B nodes and then I want to join lines into one feature. Result is just one line feature between A nodes. For better imagination, I attach pics below.

Does anybody tips how to figure out thi issue please?

Thank You so much!

Lubo


9 replies

Badge +3

Hi @lazarlubomir,

Assuming you already have the lines, I think you should just feed the lines into a LineBuilder transformer. That will generate the full lines.

Hope this helps

Userlevel 4

For more complex cases you can also look into the TopologyBuilder as part of a pre-processing workflow before the LineBuilder.

Userlevel 2
Badge +17

If the B nodes mean so-called pseudo nodes (each of them touches just two edges), the LineCombiner (LineJoiner in FME 2016 and earlier) might help you.

Badge +1

@david_r, @takashi and @lars_de_vries, thank You so much for tips! It helped me, but not completely.

I met another issue with elevation. As I mentioned on pics below, I think about analysis of line direction. I have 4 line features and 5 point features (not pseudo-points) according to topological principle. But just point no. 1 and no. 5 have attribute values of elevation. All lines are part of waterline network, so I need to water flows from no.1 (highest elevation) to no. 5 (lowest elevation). So, every line feature should have direction towards no. 5, but unfrotunately they dont have. How can I analyze, how many lines have wrong direction please?

Thank you so much for tips!

Lubo

Userlevel 4

@david_r, @takashi and @lars_de_vries, thank You so much for tips! It helped me, but not completely.

I met another issue with elevation. As I mentioned on pics below, I think about analysis of line direction. I have 4 line features and 5 point features (not pseudo-points) according to topological principle. But just point no. 1 and no. 5 have attribute values of elevation. All lines are part of waterline network, so I need to water flows from no.1 (highest elevation) to no. 5 (lowest elevation). So, every line feature should have direction towards no. 5, but unfrotunately they dont have. How can I analyze, how many lines have wrong direction please?

Thank you so much for tips!

Lubo

Have a look at the NetworkFlowOrientor and/or the OrientationExtractor+Orientor
Badge +3

If the points or the lines share a common attribute and the points have subsequent numbers, you could consider to use the LineBuilder transformer. If you insert the points in the order the line should be directed, you should get the lines you want.

You could also consider to use the LineCombiner transformer. That transformer has an option to preserve the original orientation, or not. You can check the orientation of the line, to compare the Z values of the first and the last coordinate (using CoordinateExtractors, with respectivily coordinate number 0 and -1) and if it has the wrong direction you can use an Orientor to change the direction of the line.

Hope this solves your issues

Badge +3

extract the first and last node of each line.

Use round the coordinates, to like 4 decimals. (as accuracy mostly will have the nodes not match. )

Use featuremerger to merge start verices with end vertices.

This way you'll know which nodes are reversed at the nodes as they will not merge.

Badge +1

Hello, @gio, @lars_de_vries, @david_r and @takashi, thank you for tips. Maybe, I described it wrongly -> there is no Z value. Elevation is saved just as attribute, not as Z value in 3D. I created new pics with better description.

There are several points:

M - manhole

F - fitting

TP - additional topological point

V - valve

M, F, V points have values of elevation in bottom_elevation attribute (as You can see above).

TP points dont have values of elevation.

What I need now is to analyze, how many lines are oriented wrongly according to elevation logic (e.g. line 1 or 2 can be oriented differently, so wastewater cant flow into M point with elevation 245 m. How can I analyze it, if TP point between lines 1 and 2 doesnt have elevation value?

Second issue - how can I reoriented all lines into lowest point of network? By using networkfloworientor, where I put into destination input point with lowest elevation?

Third issue - how can I join lines, if I wanna remove TP points? So I want to join lines no. 6,7 or line no. 1,2, because I want to remove TP points.

Thank You SO SO much!

Badge +3

@lazarlubomir

I actually made script that tests for the same thing you require.

For matching manholes from 2 datasets and updating them (after inspection) including the network.

Ad I did use the technique described by me, just extract 1st and last node of each line.

Match with manholes.

Manhole (elevation and or ID) direction and line direction can then be compared.

(in my case I used vertices as the attributes "from" and "to" values where messed up, did not match physical direction and did not match manhole id's)

Additional topologicalpoint (called virtual manholes around here) are precreated to the matching (handled by fifth tab in pic)

When merged you can check if highest elevation attribute on a line id matches startvertex.(by grouping attribte by line ID and getting first in group. For instance a sample grouped by ID)

You can try PointonLineOverlayer. (Did not work out for me, too many accuracy faults in fme. )

Reply