Select to view content in your preferred language

Polyline length (from gpx)

2720
7
Jump to solution
01-06-2021 01:20 PM
Labels (1)
GlenShennan
Occasional Contributor

Hi,

I'm trying to create a line(s) feature(s) from gpx data (it's a walking track) in order to make a stack profile. I import the gpx with the GPX to Features tool, which works fine. There are no lat/lon fields in the attribute table but the points are all in the right locations.

I then use Points to Line to make a polyline from the points, which I then pass to Stack Profile with the DEM to get the profile. This is all good except the polyline length is extremely short, 0.059... when the actualy trail is about 13km long.

How do I get the line to have the correct length. I've tried exploding the line, but that doesn't work because it's a single part feature.

 

ArcPro 2.7, Win 10 64

0 Kudos
2 Solutions

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

You need a projected length.  Add Geometry Attributes in ArcToolbox will allow you to calculate the length in some projected coordinate system appropriate to your locale.  For instance a UTM projection


... sort of retired...

View solution in original post

by Anonymous User
Not applicable

@GlenShennan there is a new tool called Points to Track Segments which produces a series of output paths, the "track segments", from sequential data such as GPS points. Velocity and distance are also appended to the output. Might be worth looking into.

 

View solution in original post

7 Replies
DanPatterson
MVP Esteemed Contributor

You need a projected length.  Add Geometry Attributes in ArcToolbox will allow you to calculate the length in some projected coordinate system appropriate to your locale.  For instance a UTM projection


... sort of retired...
GlenShennan
Occasional Contributor

Thanks! I used Add Geometry Attributes with the polyline as the input and Geodesic length as the geometry property and it gave me the total length of the line.

It's not ideal however to have the whole trail as a single polyline. Is there a some way I could import the gpx as points and then produce separate lines from point to point?

0 Kudos
DanPatterson
MVP Esteemed Contributor

You can "segment" your polyline if needed as well if you need segment lengths

Split Line At Vertices (Data Management)—ArcGIS Pro | Documentation


... sort of retired...
0 Kudos
GlenShennan
Occasional Contributor

...and that works too. I tried Split Line at Points but missed the Vertices tool. Thanks again.

0 Kudos
by Anonymous User
Not applicable

@GlenShennan there is a new tool called Points to Track Segments which produces a series of output paths, the "track segments", from sequential data such as GPS points. Velocity and distance are also appended to the output. Might be worth looking into.

 

GlenShennan
Occasional Contributor

Okay that worked as well seems to have given me more accurate line lengths. Thanks!

Edit: nope, line lengths were pretty much the same for both. Was looking at the wrong segments. Just to clear that up. Thanks again.

SeaRM
by
Frequent Contributor

Hi, Glen.

Try to use XTools Pro Import from GPX tool. You can import not only trackpoints but track lines as well keeping all the attributes.

At that, you can specify required spatial reference and time zone to your data when importing.

SeaRM_1-1698373363522.png

0 Kudos