I am attempting to map arctic regions. I have a predetermined area off the coast of Alaska that has longitudes both negative and positive. In a north pole azimuthal equidistant projection, it looks as it should, pictured in the first image. However, when I use the difference tool in order to remove land masses from the polygon, it uses the WGS 84 projection which crosses the map, missing all of the land that is actually within the region defined as shown below. Can I make the difference tool use a different projection? Does the reprojection tool solve this using some specifications beyond the most basic target CRS? Can I redefine my polygon to cover the proper landmass even on the WGS 84 projection?
Use either Geometry generator (for visualization only) or Geometry by expression (to create actual geomtries) with the expression from below - see here for details about both options. Be aware:
3995 is the EPSG-code for the Arctic Polar Stereographic projection,
4326 for WGS84 CRS - change this if you use another CRS.
You might also use the variable
@layer_crs instead of
4326 if your layers are not in
Explanation: the expression reprojects both layers from their layer CRS (here: both layers are in
EPSG:4326) internally to
EPSG:3995, then makes the geoprocessing (
difference) and then projects the result back in
EPSG:4326 (respectively the CRS your layer is saved in).
transform ( difference ( transform ( aggregate( 'World Map', -- change the layer name if necessary 'collect', $geometry ), 'EPSG:4326', 'EPSG:3995' ), transform ( $geometry, 'EPSG:4326', 'EPSG:3995' ) ), 'EPSG:3995', 'EPSG:4326' )