I have a shapefile of the US (5m resolution from the US Census Bureau), but I need the entire globe except for the US. To do this, I opened the shapefile (which I will call
usa_layer) in QGIS, and then added a rectangle for the entire globe:
Vector > Research Tools > Polygon from layer extent
I then added a buffer to make sure that the shape would include the poles:
Vector > Geoprocessing Tools > Fixed distance buffer Input layer: extent_layer Distance: 10 Segments: 5
Next, I took the difference of usa_layer and extent_layer:
Vector > Geoprocessing Tools > Difference Input layer: extent_layer Difference layer: usa_layer
The resulting layer looks like this:
This is what I was going for. However, when I right-click this layer and
Save As... a KML, that layer looks like this:
Obviously, this is not the same as the difference layer. When I show this layer on my Google map, I see this:
This is even worse. It seems as if the edges that were not present on the KML layer (blue) but were on the difference layer (purple) are the only ones shown. Comfortingly, on the right of this sort of capsule shape, one can see that Alaska is indeed cut out of it as intended.
Why is this weirdness happening, and how can I fix it?