5

I'm a bit of a novice with QGIS, so this is really throwing me for a loop.

For the maps I'm intending on making, an azimuthal orthographic projection would be my preference.

For example, one map I'm trying to recreate is this map of the Pacific islands from Wikipedia:

map of the pacific

I've been using the NaturalEarth Quick Start package, which has been a really good launching-off point, but I'm running into some issues at the horizon of the orthographic projection.

I've tried adding a custom projection:

+proj=ortho +lat_0=0 +lon_0=170 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs

But that gives the following map:

my map

Which certainly is close to being right, but the ocean is obviously being cut off in the Arctic and on the southern horizon.

I understand the issue is that naively mapping layers described in WGS 84 to an orthographic projection leaves you with artifacts at the horizon, but how do I fix it?


I first tried to use the Clip to Hemisphere plugin described in Ortho Projection produces artifacts, but it seems incompatible with QGIS 3; when I try adding the plugin, QGIS3 gives an error message and places it in the "Invalid" section of the Plugins window.


I then tried both solutions presented at Where did the polygons go after projecting a map in QGIS? Again the issue is with QGIS 2/3 incompatibility.


For Solution 1, both Numerical Digitize and CAD Tools are again incompatible with QGIS 3 and give the same result as Clip to Hemisphere.


For Solution 2, I can't disable on-the-fly-reprojection in settings since that setting was removed in QGIS 3.

7

You need to create a polygon with the shape of the globe in the orthographic projection to cut out the entities. That is what the solutions proposed, but with tools that are not updated to the new stable version of QGIS.

My idea is the following:

  • Create a new vector layer of points with the custom orthographic CRS.
  • Create a point in that layer. With Vertex Editor tool position it in coordinates 0 , 0.

vertex- editor

  • With Buffer tool, create a circle of 6371000m radius around the point. Use a good number of segments per quarter of a circle (90 segments form a polygon of 1 degree per side, you hardly notice the difference with a circle).
  • Save the Buffered layer with the WGS84 CRS and load it to the canvas.
  • Change the project CRS to WGS84.
  • With the Difference tool, subtract between the layers you want to represent and the exported polygon.

difference

  • Save the Difference layers.
  • Change the proyect CRS to the custom Orthographic system.

I had to eliminate the edge of the polygon of the sea because it went through the 180º longitude, in the symbology options of the layer.
Surely I am not using the same layers as you, but I do not think it is difficult to adapt the method to your layers. And the result is acceptable.

globe

  • 1
    Perfect. Took me a couple of hours to understand the mechanics behind manually creating polygon/point layers and the difference tool, but it worked exactly as advertised. It's an easy enough process that it makes all the custom plugins form the QGIS2 thread seem overly complicated. – Jack Gallagher Dec 31 '18 at 4:03

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.