Skip to main content
6 of 9
added 14 characters in body
AndreJ
  • 77.1k
  • 5
  • 88
  • 163

The simple reason why QGIS can not draw these polygons is because some of the vertices are on the backside of the globe, and QGIS can not draw a closed polygon with the rest. The GDAL ogr2ogr function in the background is programmed to kick off the whole feature when such an error occurs.

So you have two solutions:


Solution 1: Clip your polygons to the hemisphere

You need Numerical Digitize and CAD Tools plugin for that.

  • Set the project CRS to ortho projection
  • create a new point layer in the same projection
  • with the Numerical Digitize plugin, create the follwoing points:
x y
6370000 0
0 6370000
-6370000 0
0 6370000

(should also work with Add delimited text layer)

  • enable snapping on the point layer
  • with CAD Tools, select the first three points and create an arc from them
  • do the same for point 2 to 4 for the southern hemisphere
  • change project CRS to WGS84
  • Save the CAD layer as WGS84 and add that to the canvas
  • Save your boundary layer also as WGS84 and add it to the canvas
  • convert the CAD lines to a new polygon layer
  • remove all except the polygon layers
  • clip the world boundaries to the CAD polygon layer
  • set project CRS back to ortho

You should get this picture: world vector in ortho projection


Solution 2: Convert your vector data to raster

  • in Settings, disable on-the-fly-reprojection
  • Save your boundary layer as WGS84 and add that to the canvas
  • Use Raster -> Convert -> Rasterize on the WGS84 layer select x=360 and y=170 as dimensions for the raster (or n360 and n170)
  • Use Raster -> Projection -> Reproject to the ortho projection under another name and add it to the canvas. You will get some errors, but the rest of the raster will do. Don't bother that you see a grey rectangle
  • Rightclick on the raster layer -> Properties, Style tab
  • choose pseudo colours
  • in transparency tab, choose 0 for 100% transparency
  • Remove the first raster
  • set project CRS to ortho

you should see the follwing picture: enter image description here

The same method works with rasters, as you can see in my avatar picture ;-)

AndreJ
  • 77.1k
  • 5
  • 88
  • 163