Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have two vector line datasets and wish to compare the line lengths. While I have already compared the sum of the lengths, I'd like to conduct further analysis down to 250m, possibly lower.

I'm using qGIS, and already know how to create a vector grid. However I would like to create a grid which clips per individual square and compares the length of the two datasets contained within.

I realise that this is a process that could be completed manually, however the size and complexity of the data (all roads at a city level) mean manually doing the task would take months.

share|improve this question
add comment

1 Answer

One way is to use the Vector|Geoprocessing|Intersect tool in QGIS and a spreadsheet (LibreOffice/Excel).

  1. Create a polygon grid which you'll use to chop up the two line datasets – either the vector grid tool you used before (but doing a polygon output) or whatever grid you need (city blocks?). Let's call this "G".
  2. Intersect each of the line datasets - call them A and B - with the grid and call your output shapefiles something like AG and BG. The "input vector layer" in the dialog should be the line layer each time, and the "intersect layer" is the polygon. The resulting shapefile will be the line layers chopped up by the boundaries between polygons, and the attribute table will combine the ID (and other attributes) of the polygon layer.
  3. Calculate the new, chopped-up line lengths for AG and BG (Field Calculator using $length).
  4. Open the attribute tables for AG/BG in Libreoffice and do a pivottable summarising total length for the polygon ID (probably ID_2 after the intersection operation). You can then combine the pivottables by ID_2 and compare total lengths for each of the line datasets.
share|improve this answer
    
+1 for getting the best out of spreadsheets! –  vinayan Apr 15 '12 at 2:39
add comment

Your Answer

 
discard

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.