Skip to main content
Solved

Reorder attribute rows by geometry of polyline parts

  • May 16, 2015
  • 2 replies
  • 15 views

makt
Contributor
Forum|alt.badge.img+1
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
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.

2 replies

takashi
Celebrity
  • 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!