5

I'm trying to create a globe view in QGIS 2.6 with an Azimuthal Orthographic projection using NaturalEarth's 110m countries dataset.

I'm following Hamish Campbell's blog post instructions that have been replicated by other users (eg here).

Problem 1

Using Hamish's recommended projection parameters with my lats/longs: +proj=ortho +lat_0=36.5 +lon_0=-118.8 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs to define a custom projection gives this result:

Azimuthal Orthographic attempt

Lots of artefacts - what am I doing wrong / is it a bug?.

Problem 2

But Hamish mentions the presence of artefacts (I wouldn;t have thought the sort of artefacts i'm encountering but...) and recommends using some python to clip the dataset to the circle of the globe from the projection view.

I won't reproduce the python Hamish publishes (you can view it in step 2 in his post linked above) but having saved the file as clipper.py in QGIS python path, imported into the QGIS python window (import clipper) and done clipper.doCall(iface,36.5,-118.8) I don't get a new layer generated in the map window.

Are there any obvious things I might be doing wrong?


enter image description here

enter image description here

  • The command should be clipper.doClip(iface,36.5,-118.8). – AndreJ Dec 22 '14 at 16:00
  • Yes. doCall was a copy paste error I have used doClip – Mark Ruddy Dec 22 '14 at 20:32
  • 1
    Hey, nice to see this blog post is helping people :). I've tried running through it again in qgis 2.6 (previously was a much older version) and it seemed to work, so I'm not sure why the new layer isn't appearing in your layers list. One note though: if you're getting simplified geometries (the boxes in the first image), go to layer properties > rendering and turn off "simplify geometry". – Hamish Dec 22 '14 at 20:42
  • (worth mentioning that the python was lifted from this excellent post: gis.stackexchange.com/questions/78346/…) – Hamish Dec 22 '14 at 20:44
  • @Hamish hello! great blog and right to credit original GISSE post. Removing "simplify geomerty" did the trick superbly for aeqd - so simple. I'll retry the ortho projection now... – Mark Ruddy Dec 22 '14 at 20:51
4

Newer versions of QGIS have 'simplified geometries' enabled by default. As a result you might get an image like this:

enter image description here

To disable simplified geometries, untick the "Simplify geometries" option in the layer rendering options.

enter image description here

I'll update the blog post when I can.

3

I recommend reprojecting the shapefile first.

The On-the-fly-reprojection of QGIS is sometimes not able to cope with strange projections.

And make sure you are always working on a sphere. Mixing ellipsoid and sphere might also produce artefacts.

The method by Hamish works for me. I added a Vector -> Geometry -> Densify on the grid before reprojecting to Ortho:

enter image description here

If you reproject the clipped part of the world to aeqd, it does not really look the same:

enter image description here

The degree grid does not give a perspective view as the ortho projection provides. The aeqd definition promises equdistance, that's opposite to the perspective ortho view.

  • Thanks for the advice. On trying to reproject the ne_110m.shp I came across a projection error that relates to the extent of the layer (found some Qs on gis.stackexchange relating to it). Don't have time deal with that now & attempted Azimuthal Equidistant for laughs. Workflow: 1) Define projection +proj=aeqd +lat_0=36.5 +lon_0=-118.8 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs, 2) Create vector grid, 3) run clipper.doCall(iface,36.5,-118.8), 4) clip countries and grid, 5) change projection to aeqd. Gets a nice result which is an Azi Orthographic not Azi Equidistant. So now how to get AzEq? – Mark Ruddy Dec 22 '14 at 14:56
  • aeqd does not need any clipping, it can show the whole world except your antipode. See this topic on aeqd: gis.stackexchange.com/questions/68938/… – AndreJ Dec 22 '14 at 16:04
  • I'm finding this puzzling. I know aeqd displays the whole globe but using +proj=aeqd +lat_0=36.5 +lon_0=-118.8 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs gives my an orthogonal projection - see image showing natural earth ne_110m_countries wrapped around globe (see additional image attached above) – Mark Ruddy Dec 22 '14 at 19:57
  • You should better use aeqd with +R=6371000 instead of +datum=WGS84. PROJ.4 has some problems with ellipsoids on the aeqd projection, see trac.osgeo.org/proj/ticket/211. – AndreJ Dec 22 '14 at 20:20
  • Agree it isn't the same. My point is that using +proj=aeqd +lat_0=36.5 +lon_0=-118.8 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs in my instance does not produce an azimuthal equidistant projection (like this). Using +R=6371000 produces artefacts with +proj=ortho and aeqd – Mark Ruddy Dec 22 '14 at 20:20

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.