2

I have 2 road/ line datasets. A & B. A is less detailed than B. I would like any line segment in B that is not in A, to be added to A. But only the lines not in A I do not want to add in overlapping lines.

I'm using QGIS

4
  • can you provide some more info about your last sentence, please? What do you mean by overlapping lines?
    – PieterB
    Commented Aug 10, 2016 at 13:56
  • Questions like these make me feel like GIS.SE is actually a house of freelancers waiting for a new job to post.
    – Barrett
    Commented Aug 10, 2016 at 14:03
  • 1
    @Barrett - What might be a fairly simple process to some might not be so simple to others :)
    – Joseph
    Commented Aug 10, 2016 at 14:42
  • Yeah, that was a cynical moment for me. Even so, there isn't even a question mark. It feels presumptious and that's what bugs me.
    – Barrett
    Commented Aug 10, 2016 at 21:52

3 Answers 3

3

Perhaps I'm missing some nuance here, but can you simply select all the items in B that do not touch items in A. In ArcGIS it is a simple 'Select by Location' feature, but in qGIS it looks like you might have to perform a Spatial Query with the option 'Touches.' That will give you all the features from both layers that touch each other. Then you can invert the selection and you have all the features that don't touch each other and copy them into shapefile A.

0
2

I would probably do the following but this assumes that the majority of features in both layers are identical, otherwise it's not the best solution:

  1. Use the Select by location tool from the Processing Toolbox for Layer B. This should select all features which overlap those in Layer A:

    Processing Toolbox > QGIS geoalgorithms > Vector selection tools > Select by location
    

    Select by location

  2. Open the Attribute Table for Layer B and invert the selection, so now the selected features are those which do not overlap:

    Attribute table

  3. From the menubar, copy the selected features from Layer B. Then highlight Layer A and toggle the editing icon. Then paste the features:

    Copy/paste features

1

Many thanks Barrett and Joseph for your very helpful solutions. They worked and I've now managed to merge in the roads from B that were not in A.

Unfortunately I encountered some additional problems along the way. On closer inspection road network A and road network B did not overlay exactly so the overlaps option was not selecting some roads that overlapped for the most part.

To overcome this I used GRASS < Vector < v.buffer.distance

I created quite a large buffer of 40 around all roads in dataset A. I then used these buffers and the select by location feature to select all roads in dataset B that were "within" the dataset A buffers.

I was able invert the selection and had identified all roads in dataset B not in dataset A.

1
  • +1, glad you sorted out your problem =). Don't forget to accept your answer two days after posting the question by clicking the green faded tick on the left-hand side.
    – Joseph
    Commented Aug 12, 2016 at 9:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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