TransWikia.com

Determining what lines have changed in updated shapefile using QGIS

Geographic Information Systems Asked by joshdoe on April 18, 2021

I am using my county’s GIS data to update the roads in OpenStreetMap. I have a copy they published last year and one that was just published, and I would like to find all the LineStrings that have either had their attributes or their geometry changed. This will assist me in making sure all the new and modified streets are updated in OpenStreetMap.

The street segments should have a unique identifier, so my only thought is to write a Python script which opens both Shapefiles, finds any segments in the new that aren’t present in the old (added segments), and the reverse (removed segments), and then loop over matched pairs comparing their constituent coordinates to see if anything has changed.

Is there a way to do this using QGIS?

3 Answers

The thing you need to do is a temporal analysis. As you said you have two vector data(shp) of different times. you can find the change using geometry processing. In QGIS load two vectors and GoTo Vector->GeoProcessing and from there you can use Difference function which will give another shape as a result.

Answered by rkm on April 18, 2021

Just to sum up all methods that were suggested in comments:

@Germán Carrillo

Vector > Geoprocessing Tools > Symmetrical difference

The same result can be achieved with SAGA GIS Symmetrical Difference Module

and @rkm

Vector > Geoprocessing Tools > Difference

The same result can be achieved with SAGA GIS Difference Module


References:

Answered by Taras on April 18, 2021

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

Answered by ahmadhanb on April 18, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP