Skip to main content
Solved

Reorder attribute rows by geometry of polyline parts


makt
Contributor
Forum|alt.badge.img+1
  • Contributor
I have a polyline shapefile that has 4 parts and 1000 vertices. However, the first row of the attribute table corresponds to a part that is in the middle of the line (an artifact of manual editing). In other words the attributes don't follow the logical sequential order of the line. How can I reorder the parts (and attributes) of the line so that they follow a logical order? In other words, the first row of the attribute table references the the side of the line that is defined as the "start part", the second row corresponds to the neighbouring part, etc.  I need to get this order correct so that later, when I convert the line to vertices, I can then connect the vertices in the correct order. I have tried looking at TopologyBuilder, NeighborFinder, SpatialFilter, but no luck. Thanks.

 

 

Thanks

Best answer by takashi

Hi,

 

 

The LineJoiner with this setting transforms the input lines into a path preserving the original lines as path segments. Their attributes will also be preserved if you specified a list name to the "List Name" parameter.

 

- Input Feature Topology: End Noded

 

- List Name: _list

 

- Preserve Lines as Path Segments: Yes

 

 

You can then restore the original lines with a PathSplitter; the resulting lines will be output in the connecting order, and will have original attributes and Path Segment Number attribute which indicates the order.

 

- Path Segment Number Attribute: <specify any attribute name>

 

- List Attribute: _list{}

 

 

But, if your final goal is just to create a polyline connecting the original lines, just use a LineJoiner and it would be enough.

 

 

Takashi
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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.

2 replies

takashi
Influencer
  • Best Answer
  • May 16, 2015
Hi,

 

 

The LineJoiner with this setting transforms the input lines into a path preserving the original lines as path segments. Their attributes will also be preserved if you specified a list name to the "List Name" parameter.

 

- Input Feature Topology: End Noded

 

- List Name: _list

 

- Preserve Lines as Path Segments: Yes

 

 

You can then restore the original lines with a PathSplitter; the resulting lines will be output in the connecting order, and will have original attributes and Path Segment Number attribute which indicates the order.

 

- Path Segment Number Attribute: <specify any attribute name>

 

- List Attribute: _list{}

 

 

But, if your final goal is just to create a polyline connecting the original lines, just use a LineJoiner and it would be enough.

 

 

Takashi

makt
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • May 19, 2015
LineJoiner + PathSplitter did the trick - thanks for your help!

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