Skip to main content
Solved

Lines at the same location, cut and input a new segment

  • December 4, 2019
  • 11 replies
  • 36 views

connecter
Contributor
Forum|alt.badge.img+10
Hello,

 

here is my problem I can´t get solve:

 

I try the "LineOnLineOverlayer" but I don´t want to touch the red, blue and green line. I have many lines at the same location with different attributes and nodes (black point in the image). After the transformer, the red, blue and green line have new segments I don´t want.

Thanks for help!

Best answer by bwn

"Clipper" is the equivalent of QGIS Difference, by outputting the Difference between the Clippee features to the Clipper features to the Outside Port

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.

11 replies

danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • 2077 replies
  • December 4, 2019

Hi @connecter

Could you share a sample of your data?

 

Thanks,

Danilo

connecter
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • 72 replies
  • December 4, 2019

Hi @danilo_fme,

thanks for you response. I created 2 shapes, I can´t share original data, but the problem is the same.

The purple shape must cut and delete all lines from the shape "blue_red_green". After that the purple shape replace the space. It is very imported, that the rest of the data from "blue_red_green" is not modify.

I hope you understand my problem.


connecter
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • 72 replies
  • December 5, 2019

I try to solve the problem in QGIS. The tool "difference" did the job (ArcGIS eraser?). I can´t find a identical tool in fme. :(


bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • 562 replies
  • Best Answer
  • December 5, 2019

"Clipper" is the equivalent of QGIS Difference, by outputting the Difference between the Clippee features to the Clipper features to the Outside Port


connecter
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • 72 replies
  • December 5, 2019

"Clipper" is the equivalent of QGIS Difference, by outputting the Difference between the Clippee features to the Clipper features to the Outside Port

Hi @bwn, thanks for your answer. If I get it right, the clipper can´t handel lines on lines, only lines on polygones.


danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • 2077 replies
  • December 5, 2019

Hi @danilo_fme,

thanks for you response. I created 2 shapes, I can´t share original data, but the problem is the same.

The purple shape must cut and delete all lines from the shape "blue_red_green". After that the purple shape replace the space. It is very imported, that the rest of the data from "blue_red_green" is not modify.

I hope you understand my problem.

Hi @connecter

Thanks your data.

I simulated here in my machine using first the transformer Bufferer and after the transformer Clipper:

Attached the Workspace template ( .FMWT ). Workspace_Clipper.fmwt

 

Thanks,

Danilo


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

Hi @bwn, thanks for your answer. If I get it right, the clipper can´t handel lines on lines, only lines on polygones.

Hmmm, you are right, I assumed Clipper would be able to use lines as Clippers as well. There are then a couple of variations:

  1. Could use first a Bufferer with some tiny distance like 0.001 and End Cap set to None. Then use the polygon as the Clipper.
  2. Instead of the Clipper route, use LineOnLineOverlayer. The single Line output port will put out both the common line segment and the uncommon line segments, and a Tester on this will separate out the Remnant Line segments that didn't get overlapped (Where the output Line has an Attribute that only exists on the Base Layer AND does not have have an Attribute that only exists on the Erasing Layer)

connecter
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • 72 replies
  • December 10, 2019

Hmmm, you are right, I assumed Clipper would be able to use lines as Clippers as well. There are then a couple of variations:

  1. Could use first a Bufferer with some tiny distance like 0.001 and End Cap set to None. Then use the polygon as the Clipper.
  2. Instead of the Clipper route, use LineOnLineOverlayer. The single Line output port will put out both the common line segment and the uncommon line segments, and a Tester on this will separate out the Remnant Line segments that didn't get overlapped (Where the output Line has an Attribute that only exists on the Base Layer AND does not have have an Attribute that only exists on the Erasing Layer)

@bwn thanks for you answer. I tested a little bit with the LineOnLineOverlayer, but from my point of view it is too diffucult for such an easy task. The problem is, that all lines go to one inputsteam, so the shape "blue_red_green" intersects each other. That is not nessessary. Why is safe not release a simple erase tool?


connecter
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • 72 replies
  • December 10, 2019

Hi @connecter

Thanks your data.

I simulated here in my machine using first the transformer Bufferer and after the transformer Clipper:

Attached the Workspace template ( .FMWT ). Workspace_Clipper.fmwt

 

Thanks,

Danilo

Thanks @danilo_fme. But when I take the "Bufferer" I change the data and the length is not the same as before. As I manson before, why is there no simple erase tool for such tasks?


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

@bwn thanks for you answer. I tested a little bit with the LineOnLineOverlayer, but from my point of view it is too diffucult for such an easy task. The problem is, that all lines go to one inputsteam, so the shape "blue_red_green" intersects each other. That is not nessessary. Why is safe not release a simple erase tool?

@connecter. The Bufferer solution requires End Cap set to "None". This setting should result in a Clipper shape that same length and orientation as the Purple line.

LineOnLineOverlayer is a more general purpose tool to cover a wide range of different use cases, so requires manipulation of the input and output to get the desired result, including using Sorter to change the order that features enter it which determines which Attributes get used first, Group By to restrict which groups of features to compare with each other, and post-processing Lists etc. so yes, it can be a little more involved.


connecter
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • 72 replies
  • December 10, 2019

@connecter. The Bufferer solution requires End Cap set to "None". This setting should result in a Clipper shape that same length and orientation as the Purple line.

LineOnLineOverlayer is a more general purpose tool to cover a wide range of different use cases, so requires manipulation of the input and output to get the desired result, including using Sorter to change the order that features enter it which determines which Attributes get used first, Group By to restrict which groups of features to compare with each other, and post-processing Lists etc. so yes, it can be a little more involved.

@bwn Thanks! Here is the workflow: