Skip to main content
Solved

Insert point at end of line

  • March 28, 2018
  • 6 replies
  • 517 views

owen
Forum|alt.badge.img+1

Hello,

I am trying to insert vertices at the end of lines, using the vertexcreator and 'insert point at index'.

To do this I am using -1 for the index, but this adding the vertex at the point one before last (see image).

How can I get the extra vertex to be at the end?

Thanks,

Owen

Best answer by redgeographics

Have you tried the Add Point option instead of the Index one?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3703 replies
  • Best Answer
  • March 28, 2018

Have you tried the Add Point option instead of the Index one?


dustin
Influencer
Forum|alt.badge.img+31
  • Influencer
  • 629 replies
  • March 28, 2018

Try the Snipper, with vertex option, start and end set to -1 and -1.


owen
Forum|alt.badge.img+1
  • Author
  • 156 replies
  • March 28, 2018

Have you tried the Add Point option instead of the Index one?

Thanks, I hadnt thought of that. I was successfully adding points at the start index with 0 so thought -1 would work for the end as well

 

 


redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3703 replies
  • March 28, 2018
Thanks, I hadnt thought of that. I was successfully adding points at the start index with 0 so thought -1 would work for the end as well

 

 

I see your logic, in fact I assumed that that would work as well... @NatalieAtSafe, could you check with the developers to see if this is expected behaviour?

 


takashi
Celebrity
  • 7843 replies
  • March 29, 2018
Thanks, I hadnt thought of that. I was successfully adding points at the start index with 0 so thought -1 would work for the end as well

 

 

In my understanding, the logic of the "Insert Point At Index" is "to insert a new point BEFORE a vertex specified by index". If you set 0, a new point will be inserted before the start node. As well, since -1 indicates the last vertex, I think the behavior is reasonable.

 

If you need to add a new point AFTER the last vertex, you need to use "Add Point" mode anyway.

 

 


fmelizard
Safer
Forum|alt.badge.img+20
  • Safer
  • 3719 replies
  • March 29, 2018

Have you tried the Add Point option instead of the Index one?

@takashi and @redgeographics are correct. Specify 0 with "Insert Point at Index" to insert a vertex at the beginning of a feature or "Add Point" to add it to the end.

 

Currently if a negative value is set for "Insert Point at Index" which is >= the number of coordinates then the feature will be rejected with an fme_rejection_code of INVALID_PARAMETER_INDEX.