Skip to main content
Solved

Insert point at end of line


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?

View original
Did this help you find an answer to your question?

redgeographics
Celebrity
Forum|alt.badge.img+46

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


dustin
Influencer
Forum|alt.badge.img+30
  • Influencer
  • March 28, 2018

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


owen
Forum|alt.badge.img+1
  • March 28, 2018
redgeographics wrote:

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+46
owen wrote:
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
Contributor
Forum|alt.badge.img+17
  • Contributor
  • March 29, 2018
owen wrote:
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
Contributor
Forum|alt.badge.img+16
  • Contributor
  • March 29, 2018
redgeographics wrote:

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.

Reply


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