3D views of the Globe

I was after a 3D projection of the globe focusing on some areas I had been working - I was after a horizon type view of the globe and so steps in the orthographic projection. Really, I was after a cool looking 3D map of the globe to use for presentations.

From looking at various sources (listed at the end of this post), below is a workflow to create this image using QGIS. I was interested in Greenland and Sweden - to highlight other regions you’ll want to play around with the +lat_0 and +lon_0 components of the projection I use.

Horizon

The method

Step 1

Get a vector file of the globe - try this for size

Step 2

Open the vector and ensure it is projected in WGS84

World borders

Step 3

Modify values of each polygon (used for raster conversion) - I’m interested in Greenland and Sweden so set values of these polygons to 2, every other land polygon to 1:

  • Open attribute table and go into edit mode (click the yellow pencil)

  • Create a new column (I called mine AOI)

  • For the new column using the field calculator add values - this is required for the vector -> raster transformation. We’ll need to use a conditional statement here and we want all land polygons in world_borders.shp to have a value of 1 unless they are Sweden or Greenland, in which case they should have a value of 2 (NB/ CNTRY_NAME is one of the existing columns in world_borders.shp)

CASE 

WHEN "CNTRY_NAME" = 'Sweden' THEN 2

WHEN "CNTRY_NAME" = 'Greenland' THEN 2

ELSE 1

END

Add columns

Populate column

  • Save your edits and exit edit mode (re-click the yellow pencil icon)

Populated column

Step 4

Convert polygon to raster. You’ll want to be using the AOI column for the values and consider the resolution of the vector as you need to set the resolution of the output raster - values of 3600 and 1700 are enough for this example.

Rasterize the vector

Step 5

Convert (warp) raster to a self defined orthographic projection - I want Greenland to be on the “horizon” to the top left of the globe so used the following by centering around the eastern Mediterranean. If you want to focus elsewhere, then you’ll need to experiment with this:

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

Warp the raster

Step 6

Change your map CRS status (bottom right) and “Enable ‘on the fly’ CRS transformation” to your previously defined orthographic projection (step 5) (you may need to define this projection system before doing the CRS transformation - to define a custom projection go to >Settings >Custom CRS > Add new CRS > fill in the parameter box with proj4 syntax - in our case remember we are using the system defined in step 5 - I named mine “ortho_crMed”

CRS transformation

Step 7

Right click the warped raster in the table of contents and zoom to it - you should have something like this:

3D globe

Step 8

Sort out the colour scheme using the raster call values

3D globe recoloured

Step 9

Screen shot and edit (perhaps using GIMP)

Horizon

WARNING

If you will be using the image for presentations, ensure that the colours you use aren’t too light as they might not show up (speaking from experience) - this is particularly a problem if you are trying to highlight one region with a darker colour relative to other regions in lighter hues. This might be obvious but some projectors will give different results so it’s better to be on the safe side.

EXTRA: Adding longitude/latitude axis is possible by creating a grid whilst in the WGS84 projection (>Vector >Research Tools> Vector grid) and then densifying the line (>Vector >Geometry >Densify geometries) - this can then be warped in the same way as world_borders.shp (this is taken from here)

World borders vector

http://www.mappinghacks.com/data/

Inspiration

http://polemic.nz/2014/11/21/nz-azimuth-orthographic/ <- check this out for a full vector approach - this was a key source in writing this post, I just went the raster way…

http://www.wired.com/2014/11/get-to-know-a-projection-azimuthal-orthographic/

http://thematicmapping.org/downloads/world_borders.php

Written on October 16, 2015