Skip to main content
Solved

Cross section point labeling

  • September 1, 2014
  • 4 replies
  • 9 views

Forum|alt.badge.img
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

Best answer by takashi

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
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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.

4 replies

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • Best Answer
  • September 1, 2014
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

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • September 1, 2014
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.

Forum|alt.badge.img
  • Author
  • September 2, 2014
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

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • September 2, 2014
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.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings