Skip to main content
Solved

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


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

View original
Did this help you find an answer to your question?

11 replies

danilo_fme
Evangelist
Forum|alt.badge.img+42
  • Evangelist
  • December 4, 2019

Hi @connecter

Could you share a sample of your data?

 

Thanks,

Danilo

connecter
Forum|alt.badge.img+4
  • Author
  • 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
Forum|alt.badge.img+4
  • Author
  • 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
  • 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
Forum|alt.badge.img+4
  • Author
  • December 5, 2019
bwn wrote:

"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
Evangelist
Forum|alt.badge.img+42
  • Evangelist
  • December 5, 2019
connecter wrote:

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
  • December 5, 2019
connecter wrote:

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
Forum|alt.badge.img+4
  • Author
  • December 10, 2019
bwn wrote:

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
Forum|alt.badge.img+4
  • Author
  • December 10, 2019
danilo_fme wrote:

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
  • December 10, 2019
connecter wrote:

@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
Forum|alt.badge.img+4
  • Author
  • December 10, 2019
bwn wrote:

@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:

 


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