2

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.

enter image description here

5

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.

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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