merging two features from the same shapefile

3231
10
Jump to solution
11-22-2013 03:37 AM
BryceGardner1
New Contributor
I have a shapefile with all the roads in my county. Unfortunately, they are in segments. I am trying to combine them all into the same shapefile where each road has one continuous segment instead of hundreds of little segments.

I thought about using a loop, SearchCursor, selectByAttribute, and unSplitLine, but that is going to put them all into separate shapefiles (or continuously overwrite them). I need them all in the same shapefile so I can run my analysis on them.

Any thoughts about how I can move forward are appreciated.

Thanks,

Bryce
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
XanderBakker
Esri Esteemed Contributor
Hi Bryce,

Did you try the "Dissolve (Data Management)" tool?  Dissolve on your Road ID or name field and with these options:

  • Create multi part features (switched off)

  • Unsplit lines (switched on)

There is also the "Unsplit Line (Data Management)" tool (Advanced license).

Kind regards,

Xander

View solution in original post

0 Kudos
10 Replies
XanderBakker
Esri Esteemed Contributor
Hi Bryce,

Did you try the "Dissolve (Data Management)" tool?  Dissolve on your Road ID or name field and with these options:

  • Create multi part features (switched off)

  • Unsplit lines (switched on)

There is also the "Unsplit Line (Data Management)" tool (Advanced license).

Kind regards,

Xander
0 Kudos
BryceGardner1
New Contributor
Thanks for your reply, Xander. I will try that.

Thank You,

Bryce
0 Kudos
BryceGardner1
New Contributor
The dissolve tool is working almost as well as it should. For example, the original shapefile has 24 records for E MARKET ST. The dissolved shapefile has 5 records for it. I tried changing to DISSOLVE_LINES thinking that maybe the end vertices aren't exactly coincident, but I am still getting the same result. Any thoughts?
0 Kudos
XanderBakker
Esri Esteemed Contributor
Hi Bryce,

I would probably start with trying to find out why those features couldn't be dissolved into one feature. If they exactly connect, then maybe the direction of the lines is not matching? Try and symbolize the lines using a Cartographic Line Symbol, with in the Line Properties tab defining a line decoration as an arrow (second of the three options). What do you see?

Another possibility is going into edit mode and examine the feature vertices. Select a feature click Edit Vertices and look at the sketch properties. In case of Z or M do they match?

If you want share a few features and I can have a look at it...

Kind regards,

Xander
0 Kudos
BryceGardner1
New Contributor
Yes, that appears to be the problem. The lines are pointing in opposite directions for whatever reason. Is there a way around this? I would share the features with you if I knew how. I tried attaching a shapefile, but it seems that is unsupported by the attachment manager.
0 Kudos
XanderBakker
Esri Esteemed Contributor
You can ZIP the files of the shapefile and attach the zip.

It should be possible to flip the lines. I'll look into it.
0 Kudos
BryceGardner1
New Contributor
I am learning more than I bargained for here. :cool: Here is the zip file.
0 Kudos
BryceGardner1
New Contributor
I just tried using switching to MULTI-PART instead of SINGLE_PART. It worked! It doesn't matter if they are separated, the street names in our county aren't allowed to clash with one another. So, we only have one road name per road, instead of a weird situation where 11th St. is on two different sides of town. Thank you for all your help, Xander.
0 Kudos
BryceGardner1
New Contributor
Now, where is the green checkmark? I want to show others that this was answered.
0 Kudos