Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm fairly new at GIS know-how, but I've run into a problem with a projection of a world map. I have a shapefile of all countries I downloaded from Natural Earth. After projecting it into a orthographic as suggested in this other question, I changed the lat/long so that the Atlantic would be somewhat in the center.

However, after changing it, the United States, Mexico and Canada disappear from the map, as you can see here: enter image description here

When I reproject the map to a long over the US, the polygons appear again. Any suggestions?

share|improve this question
    
Note that Russia, Kazakhstan, Iran, and a few smaller Near Eastern countries also do not appear, nor does any part of Antarctica. Evidently the software is not correctly clipping the polygons that are only partially hidden. –  whuber Aug 30 '13 at 18:00
    
Which version of Qgis? Can you also provide a direct link to the layer that you have downloaded from Natural Earth? Then we can try to reproduce your problem. Thanks! –  Stéphane Henriod Aug 31 '13 at 19:58
    
That is a very strange reprojection. Provide the link so we can download and check it out. –  Gerald Sep 2 '13 at 9:29
    
Ok i looked into it and deleted my previous comment as they are clearly there. what is appears that in a CRS of WGS 84 it is projected as being on a globe, hence half the world is not visible, in a CRS of WGS84 Pseudo Mercator It appears correctly. as with any other CRS, showing all landmasses. –  Gerald Sep 2 '13 at 10:05
add comment

2 Answers

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 following 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 points 3 - 4 - 1 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 n*360 and n*170)
  • 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 ;-)


EDIT

To get a nice ortho projection centered on a point not on the equator, do the clipping in an aeqd projection with the same parameters as the ortho. You will get this result:

enter image description here

share|improve this answer
    
Does the first approach need to be adapted when the orthographic projection includes one of the poles (like in your avatar picture)? I run into problems when projecting the CAD layer to WGS84 in that case, since the resulting polygon doesn't cover the pole –  Jake Nov 22 '13 at 16:11
    
You are right. Using an aeqd projection instead of WGS84 for the clipping works for this case. Clipping on a sphere seems to be easier than the ellipsoid. –  Andre Joost Nov 23 '13 at 5:30
    
Ah yes, that's a good idea! However, it still doesn't seem to be the silver bullet: I tried using that approach with the Natural Earth 1:110M land dataset with a projection centered on 30°N, 110°E, and run into trouble when projecting the dataset to aeqd: The large polygons flip over and ruin the clipping. Any ideas? –  Jake Nov 23 '13 at 20:16
    
The antipodial point of the aeqd must lay in the sea to avoid the artefacts. Te aeqd center does not have to be the same point as for the final ortho, but must lay within the clipping circle. –  Andre Joost Nov 24 '13 at 10:12
add comment

See comment above, they have simply gone to the other side of the globe. the polygons of the countries are still there but are not visible unless the globe is spun. i am not sure on how you rotate the globe in this circumatances and mapping is generally 2 dimensional (countours etc excluding).

I would set your CRS to the country in which you want to overlay data. For instance i would use the Irish grid or OSGB grid, or as stated above the WGS84 Pseudo Mercator.

share|improve this answer
1  
Jessica wanted a picture of the whole globe as a circle. The projections you propose don't do that. –  Andre Joost Sep 2 '13 at 17:57
    
down vote is a bit harsh if you ask me. –  Gerald Sep 4 '13 at 8:59
    
That was not by me ... –  Andre Joost Sep 4 '13 at 9:45
    
Cool. I just dont get why people down vote on a suggestion. I have a bee in my bonnet about it and that is all. –  Gerald Sep 4 '13 at 9:54
    
A down-vote should not be taken personally. The entire SE network relies on up- and down-votes to float the best answers to the top of a question. I down-voted the answer because "set CRS to country...overlay data" ignores the OP's stated desire to keep the Atlantic Ocean centered on the map. –  user3461 Sep 7 '13 at 12:16
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.