Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a polyline shapefile containing a number of lines, some of which overlap. By overlap, I mean that they follow exactly the same path for some of their route, but also have bits that are not shared. As it's difficult to explain in words, the following images should help:

FirstExample

SecondExample

In the example above, you can see how the two selected lines overlap, and I want to merge them into one line feature.

Is there a way to do this with a built-in ArcGIS tool? If not, is there an easy way to check for overlapping in Python? (and then an easy way to merge two lines in python?)

share|improve this question
    
I also have an similar problem.......I have plenty of of lines to merge. IS there a proper solution to do it automatically –  user4184 Sep 9 '11 at 23:08
add comment

4 Answers

up vote 4 down vote accepted

Dissolve Lines

http://webhelp.esri.com/arcgiSDEsktop/9.3/index.cfm?TopicName=Dissolve_(Data_Management) Single Part & DISSOLVE_LINES enable in the geoprocessing tool.

share|improve this answer
    
Thanks - I'd never seen that. However, is it possible to do this without having any attributes that I can do the dissolve on? From reading the docs (for v10.0) it seems that UNSPLIT_LINES and SINGLE_PART won't work together, but the DISSOLVE_LINES option requires a field to dissolve on. –  robintw Jan 24 '11 at 1:58
2  
In answer to my own comment...yes it is - it seems to work fine. Thanks! –  robintw Jan 24 '11 at 14:56
    
So you can tick your own answer. –  Mapperz Jan 24 '11 at 15:12
add comment

If you use an ArcEditor license you could start ArcCatalog and:

  1. make a personal Geodatabase.
  2. create a Feature Dataset in the Geodatabase.
  3. Import your Shapefile in the Feature Dataset.
  4. Create a Topology in the Feature Dataset.
  5. Set the Topology Rule "Must not overlap" for your Layer.
  6. Run the Topology Validation.
  7. Check the results in ArcMap - you need to add the Topology Error Layer.

This will markup all the overlapping lines.

Hope this helps you :-)

share|improve this answer
    
Thanks - that's very useful. However, I can't seem to see a way to force all the bits found as errors to be merged - that is, to merge the overlapping bits of the polylines. Do you have any idea how to do that? –  robintw Jan 21 '11 at 12:51
    
Maybe you can use the errors to select the overlapping bits (select by location) and then export them to a seperat layer. Then you delete the overlapping bits in your (copy of) original layer. Then you make a Spatial Join from your overlapping layer to your original layer - hereby you get the attributes from your overlapping bits added to the other lines. Then you load the overlapping bits layer to your spatial joined layer. Now you can use the Dissolve tool in ArcToolbox to merge features with the same ID. I have not tried it, but I think it might work, if you understand my long explenation. –  Steen Kjeldsen Jan 21 '11 at 13:36
add comment

To fix, turn on the Topology toolbar, start editing mode, and use the Error Inspector and Fix Topology Error Tool. There are other tools to help you on the toolbar as well.

share|improve this answer
add comment

In an editing session, you could select the line segments you want to merge, then select Merge from the Editor drop down menu. The dialog box that will pop up asks you which segment you want to merge the others into. Either select the segment you want, or if it doesn't matter just go with the default.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.