I have two shapefiles of forest roads (mostly dirt) from different sources, covering the same area. The goal is to build one shapefile of roads that is the composite of the other two.

Layer A is less complete, and Layer B is more complete, i.e. if a dirt road on A is a mile long, the same road may exist on B but is a mile and a half long, and the first mile mostly overlaps with the A line but not exactly.

The trivial answer here is "just take the B road and ignore the A road" but there are cases that are reversed from the example, i.e. there are some cases where A has more detail / more roads than B.

  • how would you do overlap detection? Buffer each layer and look for overlaps?
  • how would you select only the portions of lines that are not in the overlapped region, for example, the last half mile of the B road from the example?
  • 2
    Calculate length for both, spatial join and then select the one with the longest length... it's a bit too simple but without looking at your data it's the best I can come up with. – Michael Stimson Jul 1 '14 at 2:36
  • 1
    Do you want to give one source priority over the other? Should one be adjusted to preserve the other's geometry, or should they both be 'averaged' together? Do they share attributes, or do attributes need to be preserved or merged? This is a somewhat complex task and there are a couple of different workflows I can think of right off, but any way you slice it I see a lot of manual work depending on the answer to some of those questions. A lot more detail would be needed. If we were talking ArcGIS I'd be looking at Integrate and some Topology tools. – Chris W Jul 1 '14 at 4:06
  • this is on qgis 2.4. The data is limited enough in area that I might just do it all manually, but your questions definitely help in the brainstorming. I probably wasn't specific enough in the initial question. Will toss around some ideas and think on it a bit longer. – Tom Grundy Jul 1 '14 at 4:14
  • 1
    @TomGrundy Well it helps when you've done (or attempted) something similar before. :) You might want to take a look at this question as you're brainstorming. – Chris W Jul 1 '14 at 4:45
  • 2
    Perhaps you want to check how the Road Matcher plugin for JUMP/OpenJUMP works wiki.openstreetmap.org/wiki/Roadmatcher vividsolutions.com/… – user30184 Jul 1 '14 at 21:05

seems like Road Matcher (comment from user30184 on the original question) would definintely do the trick, thanks for the lead. Apparently someone has had the same questions before... However for this one, since it's a smaller area, I just went with the brute-force solution of going with the mostly-more-thorough data source then visually scanning for any obvious discrepancies vs the other source by manipulating layer appearances. I will definitely file this one away for future reference.

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.