Skip to main content
Question

Move one vertex of a line


geo-x
Contributor
Forum|alt.badge.img+5
  • Contributor

Dear FME community.

I've a line with vertex and I want for example to move point 1 (x : 100 y: 100) to x : 102 y : 80.

I've attribute with Start X, Start Y, End X, End Y and line ID.

It is possible to do that ?

Thank you.

5 replies

lars_de_vries
Forum|alt.badge.img+10

You could use a VertexCreator for that. It has an option 'Replace Point At Index'.

You'll need to know the index first, but you can find that one using the CoordinateExtractor.


geo-x
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • May 15, 2018

Thank you for your answer @lars_de_vries finally I used the transformer CoordinateReplacer and that's works ! I think both solutions are good.

Thank you for your help


takashi
Influencer
  • May 15, 2018
geo-x wrote:

Thank you for your answer @lars_de_vries finally I used the transformer CoordinateReplacer and that's works ! I think both solutions are good.

Thank you for your help

Just be aware there is a case that the result with the CoordinateReplacer is different from the result with the VertexCreator, since the CoordinateReplacer modifies coordinate elements (x, y, z) independently according to each pair of Find and Replace.

 

Red: CoordinateReplacer, Blue: VertexCreator, Gray: Original Line

 

 

 

 


geo-x
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • May 15, 2018
geo-x wrote:

Thank you for your answer @lars_de_vries finally I used the transformer CoordinateReplacer and that's works ! I think both solutions are good.

Thank you for your help

Thank you very much for your warning Takashi :-)

 

 


amolparande
Forum|alt.badge.img+1

@lalandexavier I have same problem for shifting line x,y coordinate some how could not work is it possible to share workbench for my understanding how it's work ?


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