I have a polygon on which I run a CenterLineReplacer (medial axis). I would like to calculate the longest path spanned by the center lines.
How is this possible within FME (preferable within FME 2016) ?
I have a polygon on which I run a CenterLineReplacer (medial axis). I would like to calculate the longest path spanned by the center lines.
How is this possible within FME (preferable within FME 2016) ?
Here's one way that might work, given that I've understood the question properly
- Run the center lines through the TopologyBuilder
- For each end node (a node that isn't connected to more than one edge), create a line to each of the other end nodes (VertexCreator), e.g.
- ShortestPathFinder + LengthCalculator + Sorter by length, descending
- Your first feature should now contain the longest path
Hi @chau, a possible solution I can think of is:
If you could provide a sample polygon data, I would test the solution above.
I have FME 2016.1.3.2 installation. Can you work with this version?
Hi @chau, a possible solution I can think of is:
If you could provide a sample polygon data, I would test the solution above.
I have FME 2016.1.3.2 installation. Can you work with this version?
I used the idea and it worked!
Thanks both of you.
Hi @chau, a possible solution I can think of is:
If you could provide a sample polygon data, I would test the solution above.
I have FME 2016.1.3.2 installation. Can you work with this version?
hi @takashi, @david_r, @chau,
I also need to do this exactly. I managed to have it working but I was wondering if there was a more efficient way of doing it, especially related to the point 3 of @takashi's comment.
Here is my workspace with a sample (developed in FME 2019.1) :test_sans_multi_lignes.fmwt
Do you have you guys have any advice for me ?
Thanks in advance !
Hi @chau, a possible solution I can think of is:
If you could provide a sample polygon data, I would test the solution above.
I have FME 2016.1.3.2 installation. Can you work with this version?
Hi @Takashi Iijima, @Casper Børgesen and @david_r,
i have the same problem, but the approach doesn't work for me. The centerlines are only one line. If I put them in the NetworkTopologyCalculator, they come out as rejected features. The help of the TopologyCalculator says "That is, all features must be split at junctions." If you split them with the Intersector, you can no longer calculate the longest paths afterwards.
I would be very happy if you could help me.
Hi @Takashi Iijima, @Casper Børgesen and @david_r,
i have the same problem, but the approach doesn't work for me. The centerlines are only one line. If I put them in the NetworkTopologyCalculator, they come out as rejected features. The help of the TopologyCalculator says "That is, all features must be split at junctions." If you split them with the Intersector, you can no longer calculate the longest paths afterwards.
I would be very happy if you could help me.
The Solution posted above uses TopologyBuilder to build the Network. NetworkTopologyCalculator is a different transformer that is used on Networks that are already built and is not used for this solution. NetworkTopologyCalculator is instead used to calculate how many different separate networks exist, and which of those networks each line belongs to.
The Solution above also uses ShortestPathFinder to find all paths on split lines. A Path combines all the individual network segment lines together, so it doesn't matter if the centrelines are split up at their intersection points, the ShortestPathFinder will return them back as one "virtual" Path line, which can also be recombined back into a single polyline with GeometryRefiner if desired.