Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm 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'd 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.

I'd like to do this using FOSS software, such as QGIS or Python/OGR. 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 this a good approach? Is there a simpler way?

share|improve this question
It sounds like you are looking for a QGIS equivalent to ArcGIS Feature Compare – PolyGeo Oct 23 '12 at 23:38
+1 - really interesting question. I've had a look at comparing shapefiles in QGIS by selecting them in the attributes table, copying (ctrl-C/cmd-C) and pasting in a text editor to compare WKT text directly, but this doesn't do it segment by segment and is obviously tedious. Very interested to see a good solution come out of this question. For OSM data, you can download history for individual features, too, but it would be nice to have a generic solution. – Simbamangu Oct 26 '12 at 7:27

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.

Hope that helps

share|improve this answer
+1 - this works nicely for two OSM datasets a month apart, resulting in a layer that preserves the attributes of changed objects. – Simbamangu Nov 1 '12 at 16:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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