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 am using QGIS. I am trying to clip contours and water vector layers to the exact size of my map (polygon layer). Sometimes it works; sometimes the program crashes before completion (at the same point each time); and sometimes it runs but doesn't clip the exact area. How can I prevent this from happening? Thanks

share|improve this question
    
Using the exact same datasets, you get those three different outcomes randomly? –  underdark Nov 28 '12 at 9:55
    
No. I have 4 sets of contours and 2 water layers to cover my area. So each combination gives the same result each time, but a different combination of vector layer and polygon gives a different result. –  Liz Nov 28 '12 at 9:58
    
Please post an link to an image of what you mean by "doesn't clip the exact area" –  underdark Nov 28 '12 at 10:01
    
This is the best I can find quickly, donmeltz.com/blog/index.php/2011/06/10/arcgisqgis-faceoff. Shows how it should look. But sometimes I have contours which carry on outside of the area. ie most unwanted ones are removed but a few remain. –  Liz Nov 28 '12 at 10:50
1  
Sorry, links to your local disk won't work ;-) –  Andre Joost Nov 28 '12 at 11:36
show 1 more comment

1 Answer

You should check your data to be topologically clean.

In menu Vector >> Geometry >> Check geometry validity

share|improve this answer
    
Yes I have and removed any errors. It has cleared up the error with the contour layer that didn't match the area - it now does. Now I have tried the clipping the other contour layers to the East as previously done (see link above to my map). But instead of clipping the contours in that layer, it clips the ones to the west which are on a different layer!! Not sure how that even makes sense. I am 100% sure I am not just clipping the same layer again but a different one. –  Liz Nov 28 '12 at 11:24
1  
@Liz: Are you sure all layer CRS are same? –  underdark Nov 28 '12 at 12:15
2  
For clipping, it is important that the Geotiff and vector data have the same CRS incorporated. Setting the CRS in Qgis is not enough, you have to reproject them with gdalwarp (Tif) and ogr2ogr by "Save As..." (vector). –  Andre Joost Nov 30 '12 at 6:36
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.