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 OSM road network data in QGIS along with a shapefile showing the possible extent of a flood.

My question is: is it possible to exclude all of the roads that are in the flood zone (so as to pretend that they are flooded/impassable) and generate a road network that can then be used for routing?

My initial thought was to use the clip function but it simply clips the road network shapefile to the same overall shape as the flood shapefile, not just the sections that would actually be flooded.

This screenshot may help explain a little more...

enter image description here

share|improve this question
    
if you had both files in PostGIS answer would be simple: SELECT * FROM road as r , flood as f where ST_Intersects(r.the_geom, f.the_geom) IS NOT TRUE . How its done in QGIS, reverse clip ? no idea how it's done –  simplexio May 20 '13 at 12:31
3  
Does the Difference tool accomplish what you want? It's a "reverse clip" of sorts. Otherwise, not sure what you want to accomplish. –  Baltok May 20 '13 at 13:32
    
If the difference tool doesn't work I have done this before: Make a giant polygon covering the area of interest, clip the flood zone from it, and then use the resulting file to clip the roads. Its not an ideal solution but it should work. –  eseglem May 20 '13 at 16:11

1 Answer 1

up vote 2 down vote accepted

The Difference Tool should do what you want as @Baltok has suggested.

enter image description here

Just set the streets layer as the input layer and the flood layer as the difference layer.

enter image description here

This should result in a new streets layer but with the flooded area removed. You might want to check this tutorial for more details.

enter image description here

share|improve this answer
    
Thanks everyone! The Difference tool worked like a charm. I think I had the layers mixed up. –  user14519 May 21 '13 at 7:57

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.