Skip to main content
Solved

What geometries do Paths get written as?

  • December 13, 2019
  • 2 replies
  • 15 views

bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • 562 replies

Stupid question, but I'm wondering how much post-processing I need to do on the output of a ShortestPathFinder before writing it into say, an FGDB.

So, a Path is not a Line feature in FME, it seems to be really an aggregate of its component segments, and each segment has a direction indicator on it so that the Path "knows" how to virtually act as a line with the correct virtual Vertex order, regardless that the component segments that are its aggregate, could alternately be running in opposite directions from each other, and one of a Path's segment's start vertex be an adjacent segment's start vertex as well (ie. The adjacent segments run in opposite direction to each other)

However, if I put the output straight to say, SpatiaLite or FGDB, then the writer needs to downconvert the Path to Line. Fine, this is desirable behaviour in my case.

My question is though: In what order do the vertices get written? In the direction of the Path, or does it depend on the orientation of the component segments whether they run in the opposite or same direction as the Path? I'm trying to avoid having the run a PathSplitter and stitch all the geometries back together into true Line features before sending it to the FGDB or SpatiaLite writer.......I'm hoping that the correct "virtual" Path vertex order is kept in the Line geometries output by the Writer(s)

Best answer by takashi

Hi @bwn, you can use the GeometryRefiner transformer to transform a Path geometry into a Line geometry keeping the correct order of the vertices.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • 7843 replies
  • Best Answer
  • December 13, 2019

Hi @bwn, you can use the GeometryRefiner transformer to transform a Path geometry into a Line geometry keeping the correct order of the vertices.


bwn
Evangelist
Forum|alt.badge.img+26
  • Author
  • Evangelist
  • 562 replies
  • December 13, 2019

Hi @bwn, you can use the GeometryRefiner transformer to transform a Path geometry into a Line geometry keeping the correct order of the vertices.

Thanks @takashi , another masterful response! One more Transformer learned, and sure beats my tortuous PathSplitter + LineCombiner combo I had in my Workspace!