Skip to main content
Hi there,

 

I have cross section polylines (black polyline) and a reference drainage network (also polylines). I created intersection points from the two datasets (blue circles). Now I have to label these points like in the picture below:

 

 

 

Point C (green) is the intersection between the cross section polyline and a centre line. L and R corresponds to left and right side, I get as attributes from the reference drainage network. My cross section lines have all the same vertex order.

 

What is a good way to do that with FME?

 

 

Thanks in advance

 

Borone
Hi, Borone

 

 

These processes could be a solution. Assuming that the vertex order of the cross section line are going to right from left.

 

-----

 

1) Create cross section line that has the intersection points and the center point as its vertices (PointOnLineOverlayer + LineJoiner).

 

2) Set measure to vertices of the line (MeasureGenerator).

 

3) Transform the line into vertex points (Chopper).

 

4) Extract measure as attribute for each point (MeasureExtractor).

 

5) Transfer the measure attribute to the intersection points and the center point (SpatialFilter).

 

 

6) Select the center point from those points (SpatialFilter), and merge its measure value to every intersection point (FeatureMerger, unconditional merging).

 

7) Divide the intersection points into left hand side and right hand side, by testing whether the measure is less than the measure of center (Tester)

 

 

8) For left hand side intersection points:

 

Sort the points by the measure descending (Sorter).

 

Add 1-based number (Counter), and create label text (StringConcatenator).

 

 

9) For right hand side intersection points:

 

Sort the points by the measure ascending (Sorter).

 

Add 1-based number (Counter), and create label text (StringConcatenator).

 

 

Takashi
P.S. If you have to process multiple cross sections simultaneously, consider specifying section ID to Group By parameter of some transformers and Counter Name of the Counters.
Hi Takashi,

 

 

I implemented your label process description into my workbench. It works very well.

 

By the way is there a way to preserve the z coordinates of the intersection points because my input datasets are all 3D?

 

 

Borone
I think z coordinates will be preserved if you send the original intersection points to the Candidate port of the SpatialFilter at the 5th step.

Reply