2

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

6
  • Using the exact same datasets, you get those three different outcomes randomly?
    – underdark
    Nov 28, 2012 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, 2012 at 9:58
  • Please post an link to an image of what you mean by "doesn't clip the exact area"
    – underdark
    Nov 28, 2012 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, 2012 at 10:50
  • 1
    Sorry, links to your local disk won't work ;-)
    – AndreJ
    Nov 28, 2012 at 11:36

1 Answer 1

1

You should check your data to be topologically clean.

In menu Vector >> Geometry >> Check geometry validity

3
  • 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, 2012 at 11:24
  • 1
    @Liz: Are you sure all layer CRS are same?
    – underdark
    Nov 28, 2012 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).
    – AndreJ
    Nov 30, 2012 at 6:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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