Skip to main content

So, FME has this fabulous transformer, the "Center Line Replacer." But when you're trying to get the centerline of a lake, sometimes it doesn't work so well:

Now, I'm a reasonably smart dude, but I have yet been able to figure out how to get a single, longest distance line out of this net.

Does anyone know how?

Many thanks in advance!

Johnny

I would try using the ShortestPathFinder, using the start and end point of the desired line segment.

Hope this helps.


I would try using the ShortestPathFinder, using the start and end point of the desired line segment.

Hope this helps.

I've tried shortest path finder, but I don't have clear start and end points. What I need to know is the length of every route across that network. It's... challenging, to say the least.


In this scenario, it's not clear exactly what outcome is desirable. Something like this?

 

 


In this scenario, it's not clear exactly what outcome is desirable. Something like this?

 

 

This is very close to what I am after, yes. The desired outcome is a line that can then be used to guide a label for the feature. So, ideally, the line would reach from one 'end' of the feature to the other, though sometimes, as in this example, there aren't clear 'ends'. A similarly problematic feature is Lac Manicouagan in Quebec, Canada, which is a round lake with a big island in the middle, though a longest route approach may work for that since the route could be infinite.


This is very close to what I am after, yes. The desired outcome is a line that can then be used to guide a label for the feature. So, ideally, the line would reach from one 'end' of the feature to the other, though sometimes, as in this example, there aren't clear 'ends'. A similarly problematic feature is Lac Manicouagan in Quebec, Canada, which is a round lake with a big island in the middle, though a longest route approach may work for that since the route could be infinite.

Something close to this can be achieved by taking all the dangling end points from the line produced by the centreline replacer, creating lines between all permutations of points, then sending these as from to lines into the shortest path finder, sending the original line as the network. You can then choose the longest of these lines.


Something close to this can be achieved by taking all the dangling end points from the line produced by the centreline replacer, creating lines between all permutations of points, then sending these as from to lines into the shortest path finder, sending the original line as the network. You can then choose the longest of these lines.

Would this be possible for multiple features, i.e. multiple networks? Would I have to set up some sort of loop? I have not used Shortest Path Finder much, so I am unfamiliar with its mechanism.


Something close to this can be achieved by taking all the dangling end points from the line produced by the centreline replacer, creating lines between all permutations of points, then sending these as from to lines into the shortest path finder, sending the original line as the network. You can then choose the longest of these lines.

This did help set me on the right path to finding what I needed to do. Thank you!


Reply