I want to erase the pink polygon from the blue polygon. I've tried clip, difference, and symmetrical difference. Clip produces an empty polygon. Difference produces just another blue polygon.
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
The problem was that the blue polygon was in another projection, and QGIS was projecting it on-the-fly. It seems QGIS geoprocessing tools perform operations in the defined projection rather than on-the-fly.
Difference is the right geoprocessing tool, but both the input and the difference layer had to be defined in the same projection.
I had the same problem with the CRS projection settings of the two layers that I wanted to difference.
Another requirement I found is that the two layers need to be of shapefile type. I had added a vector layer from gml input (qgis imports this as polygons) that would not difference with the blue square shape layer (drawn as shapefile). Saving the gml layer as shapefile layer (rightclick layer - save as) and then executing the differencing tool with that made it work for me.
This probably has to do with the fact that Qgis needs a projection file associated with the layer, this is only generated when saving the gml file as a shp file.