4

Looking to find a method of simply detecting if the geometry between two layers (line) has been altered.

I have two layers of the exact same features but I suspect there is a difference in some of geometry between the two. Is there a way to simply detect change between the two layers? I'm not interested in the attribute change; I simply want to see the areas where there is a difference between the two layers.

  • You can do an Intersect to see if the lines match up. If there are any gaps in the resulting layer (ie. missing segments) then you know the lines are not exactly on top of one another. – Joseph Feb 10 '15 at 16:31
  • 3
    @Joseph You could also use the Symetrical Difference or simply Difference to actually obtain the feature geometries that have changed, as stated here: gis.stackexchange.com/questions/37381/… – Germán Carrillo Feb 10 '15 at 16:37
  • @gcarrillo even better! – Joseph Feb 10 '15 at 16:38
  • I tried both the symetrical difference and difference and both outputs showed the entire dataset instead of the differences. – rspencer38 Feb 10 '15 at 17:10
  • 1
    Would it be possible for you to upload your 2 layers so that others can test it? Also, is the CRS for both your layers and the projection the exact same? – Joseph Feb 12 '15 at 10:26
3

There is a new tool which was added in QGIS 3.12 called "Detect dataset changes" that does exactly what you want. It accepts any geometry type including line. The tool

Compares two vector layers, and determines which features are unchanged, added or deleted between the two. It is designed for comparing two different versions of the same dataset.

Original line:

enter image description here

Modified line:

enter image description here

Changes happened:

enter image description here

For polygons, you can see the help:

enter image description here

Please refer to the help above for more detailed information.

Information in the changelog for QGIS 3.12: https://qgis.org/en/site/forusers/visualchangelog312/#feature-add-new-algorithm-detect-dataset-changes

| improve this answer | |
2

Just to sum up all methods that were suggested in comments

  1. Vector -> Geoprocessing Tools -> Symmetrical difference @Germán Carrillo. The same result can be achieved with SAGA GIS Symmetrical Difference Module
  2. Vector -> Geoprocessing Tools -> Difference @rkm. The same result can be achieved with SAGA GIS Difference Module.

References:

| improve this answer | |

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.