[GIS] Why does clipping a line layer using a polygon result in an empty shapefile

cliplinepolygonqgis

I am using QGIS 2.2.0 and want to clip a line layer (roads) so that only those inside a polygon are shown. When I do this using Vector->Geoprocessing Tools->Clip I only get an empty shapefile as an output. I have tried transforming the original road shape file from multipart to singlepart before clipping and still have the same problem.

I've included a screenshot of what I am trying to do.

Does anyone have an idea of what is going wrong or something to do differently?

Clipping Line by Polygon

Best Answer

For the clipping of two layers, it is mandatory that both are stored to disk in the same CRS.

What you can do is:

  1. Save the polygon layer with Rightclick -> Save As ... choose a new filename and WGS84 as CRS
  2. Add the new shapefile to the canvas
  3. remove the old polygon layer
  4. clip the roads to the polygons

You can obviously do it the other way round too.

Related Question