Skip to main content
I have data with lines and polylines.. I’d like to have segment with 30m from the starting point and from the ending point (end minus 30). For the polyline I’d like to have only the first and the last segments. I’m using chopper (2 vertexes) to get lines from 2 vertexes but then I need to choose only the first and the last segments. The resultings segments should have the same angle of starting or ending segments of polyline. Any idea .. thanks
Hi,

 

 

The Snipper with the following parameter setting will output the first and the last segments from the Remnants port.

 

Snipping Mode: Vertex

 

Starting Vertex: 1

 

Ending Vertex: -2

 

 

Takashi
Thanks.. it's work for 90% of polyline.. Now when i try to use extend the segment if it has the length les than to 30, I have some problems (it delete the segment and make another one)..  What I have (the first) and what I want (the second) and whatI got (the third)

 

what I want

 

 

 

 

 

 

thanks for help
The 2DVectorCalculator (FME Store transformer) might help you.

 


You can also get a bit of the end and start of a line (using snipper).

 

Then get their angle (ie.. with azimuthcalculator)

 

 

Extract 1st coordinate of endpiece and lastcoordinate of endpiece.

 

 

Use affiner to move them with your required distance (30 in your example).

 

Affiner settings would be 1,0,  30*cos(angle) and 0,1,30*sin(angle)

 

direction of move: to extend it, it is positive. to reduce it, it is negative.

 

Now you can connect thes new points at the end of the linepieces.

 

 

Then
thanks Takashi and Gio.. I will try your idea on monday.. For now I used to take a 30m segment from every line by adding measure and take 0-30 from the start and 0-30 from the end.. it's not which I want but it works.. I will continue to trying and write again
Hi, I got it with 2DVectorCalculator.. thanks alot

Reply