0

I was planning to make a global orthographic map, that would show country borders and oceans. Therefore,i followed this method which plots a map similar to my requirements. However, i modified the codes so that the map is centered on Asia:

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

Although the land areas were projected just fine, i was having problem with the ocean's layer, as you can see in these pictures: enter image description hereenter image description here

I decided to change the projection of the ocean layer to the custom projection, but that makes the ocean layer entirely invisible: enter image description here

There has been a similar post regarding this problem, where it was suggested to use uncheck the simplify geometry options in the layer rendering, but that didn't work for me. I'd be really grateful if someone suggested me any way to properly project the ocean layer in the globe, like in this picture: enter image description here Thanks in advance.

  • Please clafiry what you mean by "I decided to change" - did you transform/save the layer to the custom CRS, or did you just set the CRS? – Erik Aug 15 at 7:31
  • Thanks for your reply, I set the CRS of the ocean layer to the custom projection. – asheef_ik Aug 15 at 8:27
  • Yeah, and this is why the layer disappeared. Setting the CRS is the wrong option in most cases. – Erik Aug 15 at 8:54
  • Well in that case, what do you suggest i should be doing ? – asheef_ik Aug 15 at 19:35
  • The other option I outlined. – Erik Aug 16 at 20:13
1

That's what happens when a layer passes the visible "half" of the globe the general recommendation is cutting the layer at the "edge" longitudes of your custom projection. You can follow the instructions shown here and here

| improve this answer | |
  • Thanks for replying. I went through the two solution that you mentioned. I created a pyhton script, saved it as "cliportho.py" in the qgis pyhton folder "....apps\Python37\lib\cliportho.py". I imported cliportho and called it in the python console using cliportho.doClip(iface, lat=10, lon=90, filename='ne_10m_ocean.shp') as those are my desired coordinates. but it returns mw with the following error: TypeError: QgsCoordinateTransform(): arguments did not match any overloaded call: overload 5: argument 1 has unexpected type 'QgsCoordinateReferenceSystem' . – asheef_ik Aug 15 at 8:33
  • Yeah i guess you need to update the script with the new pyqgis api because that script is pre-qgis3. – Raúl Nanclares Aug 15 at 16:41

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.