Skip to main content
Question

Calculate Start, End and Middle Coordinates for Polylines

  • July 9, 2018
  • 3 replies
  • 127 views

Forum|alt.badge.img

Hi All,

I have a shapefile that consists of polylines (some lines are curved) and I want to calculate new attributes for the start, end, and middle xy coordinates for each line. The final results should be the original geometry but with 6 new attributes.

Note that the middle coordinates need to be on the line, not the bounding box.

Any thoughts on how to best accomplish this task?

Regards,

Michael

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.

3 replies

Forum|alt.badge.img+2
  • 719 replies
  • July 9, 2018

Hi @potterman81

One way you could find the coordinates for the middle point of each line would be to first use a Snipper. In here set the Snipping Mode to Distance (Percentage) and set both the Starting and Ending Location to 50 (see image attached). This essentially creates a point feature at the centre of the line. From here you can use the Coordinate Extractor and using the Mode Specify Coordinates you can rename the X and Y attributes to signify this is the middle xy point.


pat_uow
Contributor
Forum|alt.badge.img+1
  • Contributor
  • 26 replies
  • July 9, 2018

The coordinate extractor with parameter 0 for the start and -1 for the end will extract the start and finish vertices and allow then to be added as attributes


pratap
Contributor
Forum|alt.badge.img+12
  • Contributor
  • 605 replies
  • July 10, 2018

Hi,

I think you are asking only about arcs in polylines and not rest of the line right?

or does the sugestions received were answered your question.

Pratap