Solved

Snipper Transformer - why won't it always snip from both ends of a polyline?

  • 7 February 2023
  • 4 replies
  • 19 views

Badge

Hi,

I have a rail network, featuring multiple polylines. I need to snip 50m from the ends of each line.

Using the Snipper transformer, I use the Distance (Value) mode. The Starting location is 50, the Ending Location is the length of the line -100 (accounting for the 50 already removed at the Starting Location... maybe?!).

SnipperThe results are mixed: A dead straight line has 50m removed from each end, this is what I want.

Any other shape of line only removes the starting 50m, but NOT the end, as shown by the red "X" below. The blue lines indicate the Remnants.Snipper resultsWhat am I doing wrong? Can anyone help please?

icon

Best answer by dustin 7 February 2023, 16:09

View original

4 replies

Userlevel 3
Badge +26

You will need to use @Length() where you now have @Value(SHAPE_length). So it would be @Length()-50 for the ending location.

Badge

You will need to use @Length() where you now have @Value(SHAPE_length). So it would be @Length()-50 for the ending location.

Oh I seeeeeee! Yes that works, thank you. Take a bow.

Userlevel 1
Badge +10

You should only need to specify 50 not 100, but either way you should see 2 remnants for each line snipped.

 

Are there any warnings in the log? Along the lines of

@Snip (or FMELine::snip) was given a range of (20,120), which is out of bounds for a line length of 100. Snapping params to closest valid value.

Are any of the lines doubling back on themselves?

Badge

You should only need to specify 50 not 100, but either way you should see 2 remnants for each line snipped.

 

Are there any warnings in the log? Along the lines of

@Snip (or FMELine::snip) was given a range of (20,120), which is out of bounds for a line length of 100. Snapping params to closest valid value.

Are any of the lines doubling back on themselves?

Thank you. @dustin​  answered it just now. I was using the wrong syntax. Once I'd used @length rather than @Value(Shape_Length) it worked a treat. And yes, I use 50 and -50 now.

Reply