1

I am new to QGIS.

I have an underlying polyline map layer and another polyline layer representing a drive I took. Naturally, the drive data overlaps the map and I would like to create a new layer showing where the polylines from the two layers overlap.

I have previously used to the 'MergeLines' plugin, however, it doesn't seem to take two layers into account?

  • Have you tried Intersect? (Vector - Geoproccessing Tools) – BERA Sep 20 '17 at 5:19
  • Overlaps and intersections of lines tend to be only points if lines do not share exactly same vertices. I guess that actually you would like to find more, like line sections which are relatively close. – user30184 Sep 20 '17 at 6:28
  • Hi @BERA I have tried intersect and only seems to work when I put a buffer on the original polyline but that seems to mess with the final output length (I intend to measure the overlapping length) - surely there has to be another way. And exactly, I would like to find sections that are overlapping that are not 'points'. Thanks you for you help so far, would love to solve this issue! – ar002 Sep 20 '17 at 7:02
2

Overlapping lines are quite rare when you are tracking with a gps. They use to have plenty of intersections but just a few lines where they overlap tight. In case you are looking for those intersection points you can do this: How to identify line intersection in QGIS when I have more than 2 lines?

As you are working with roads and cars, bikes or whatever, may be you can do something else: Take into account that at that scale we have some margin of error as cars and persons are 3D.

So the process with your polylines could be:

  1. Create a buffer of the drive you took (0.5 m for example).
  2. Clip the road inside that buffer.

enter image description here

enter image description here

enter image description here

  • Thank you very much for your help, it's greatly appreciated. I probably should have specified - I'm looking to extract the 'common vectors' from both the map (i.e. road, path vector polylines) and the car trip. So essentially, what should be extracted is another layer with polylines of just the places where the car has travelled AND there is a 'registered' road. Hopefully that makes sense, please let me know if you have any further thoughts :) – ar002 Sep 20 '17 at 7:14
  • But yes! I agree, overlapping lines are rare because they are quite narrow. However, I feel that there should be a way to extract overlapping vectors in this situation as the roads indicated by lines on OpenStreetMap are quite wide. Thanks – ar002 Sep 20 '17 at 7:16
  • Although Roads line in OpenStreetMap appears wide, they are just simple lines. so you would have to buffer them to get good results. otherwise, it is just intersection of two lines. – neogeomat Sep 20 '17 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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