Skip to main content
Question

Calculate Start, End and Middle Coordinates for Polylines


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

3 replies

Forum|alt.badge.img+2

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
  • 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+11
  • Contributor
  • 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


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