Skip to main content
Solved

Create continuous line builder output with connection break attributes


warren156
Forum|alt.badge.img

I'm creating a collection of line features from a GPX file. I've processed the points from the file to calculate things like slope and speed at the various locations. I've then generalized these slope attributes into Uphill, Downhill, and Flat. I want to use these as Connection Break Attributes to segment the LineBuilder output. However, upon doing this I've realized that there are distinct gaps in the track as there is no line connection between the vertices that start/end a line that has a different Connection Break Attribute. Is there a tidy way to attach these together?

Best answer by takashi

Hi @warren156, how did you calculate the values of slope?

Slope is a property of 3D linear geometry, and I guess that you have calculated it based on elevations of consecutive two points.

If so, I think you can also create line segments connecting between every pair of consecutive two points and add the attribute "shape_class" (Uphill, Flat, Downhill) to the line segments, rather than to the points. You can then get desired result by connecting the line segments with the LineCombiner (called LineJoiner in older versions) grouping by the "shape_class".

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

4 replies

warren156
Forum|alt.badge.img
  • Author
  • May 29, 2018
I forgot to include an image detailing what the output lines and attributes look like. I've attached it below.

 

 

 

 


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • May 29, 2018

The easiest thing to do would be on your original points, clone the point where the break value switches, and give the cloned point the new value (leaving the original point as is)

 

 

A: Up

 

B: Up

 

C: Flat

 

D: Flat

 

E: Down

 

 

Would become

 

A: Up

 

B: Up

 

B: Flat

 

C: Flat

 

D: Flat

 

D: Down

 

E: Down

 

 

This can be accomplished with an attributeCreator with Enable Adjacent Features and a Cloner.

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • Best Answer
  • May 30, 2018

Hi @warren156, how did you calculate the values of slope?

Slope is a property of 3D linear geometry, and I guess that you have calculated it based on elevations of consecutive two points.

If so, I think you can also create line segments connecting between every pair of consecutive two points and add the attribute "shape_class" (Uphill, Flat, Downhill) to the line segments, rather than to the points. You can then get desired result by connecting the line segments with the LineCombiner (called LineJoiner in older versions) grouping by the "shape_class".


warren156
Forum|alt.badge.img
  • Author
  • May 30, 2018
takashi wrote:

Hi @warren156, how did you calculate the values of slope?

Slope is a property of 3D linear geometry, and I guess that you have calculated it based on elevations of consecutive two points.

If so, I think you can also create line segments connecting between every pair of consecutive two points and add the attribute "shape_class" (Uphill, Flat, Downhill) to the line segments, rather than to the points. You can then get desired result by connecting the line segments with the LineCombiner (called LineJoiner in older versions) grouping by the "shape_class".

Hi @takashi,

 

 

I calculated slope using the elevations between 2 points as you mentioned. However, my methodology was slightly more complicated. THe overview is that some of my GPX points are very dense (<1m apart) and other much more reasonablly space at ~100m. Therefore I buffered every GPS point by 150m (just to be safe) and overlaid that buffer on the GPS points to create a list of the eligible pointsto use for elevation sampling. I then filtered that list and kept those that were within 5 objectids on either side (this eliminated those points that were part of that GPS track that passed along the same road segment at a different point in time). These points became the extent points from which I sampled slope.

 

 

If I have it correct, I think I'm going to use the Attribute Creator with Adjacent Features and create a pair of coordinate attributes on each point and populate it with the coordinates of the Subsequent track point. I'll then create a vertex for the "root" point and the subsequent point to create line features from that geometry. I should then be able to do as you mentioned and clean everything up with the LineCombiner. (Bit of a combination of your suggestion and @jdh, I'll report back when I've completed.

 


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