Skip to main content
Question

How to change the length of a line with an attribute table?


Hello, I have a shapefile with lines that have a length. I would like to extend or shrink these lines by using the data of the attribute table. Can you explain how to proceed ?

thank you,

Fabrice

4 replies

redgeographics
Celebrity
Forum|alt.badge.img+50

The Extender can extend a line, on both ends, and the length of the extension can be taken from an attribute. So in your example if B is your original line and you have an attribute specifying the length of B' you will get B + B'


takashi
Evangelist
  • March 14, 2016
redgeographics wrote:

The Extender can extend a line, on both ends, and the length of the extension can be taken from an attribute. So in your example if B is your original line and you have an attribute specifying the length of B' you will get B + B'

Hi @fabkouyou, addition to @redgeographics' answer, you can also use the Snipper transformer to shrink the lines. Set x to Starting Location and set (L - x) to Ending Location. Here x indicates the required shrinking length for one end, and L indicates the length of the original line. L can be calculated with the LengthCalculator or @Length() function.


david_r
Celebrity
  • March 14, 2016

As @redgeographics says, use the Extender. To shrink, use a negative extension length in the Extender.


  • Author
  • March 14, 2016

Hello, thank you very much for your answers. I add "AttributeCreator" to calculate the length to extend or shrink. and after the "Extender. And all is OK


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