2

Right now I am building an application in OpenGL. The application maps a spherical Earth texture map to a polygon approximating a sphere. When I use any of the sphere textures such as from http://planetpixelemporium.com, the map fits neatly and latitude and longitude values returned are accurate. However I am unable to successfully map a image created from QGIS to the sphere. The map appears slanted to one side.

I assumed this was because the spherical textures are different from the images produced by QGIS. Now using QGIS and https://www.naturalearthdata.com/ for maps would be a great asset for my project.

Is there a way to map this into the texture format that fits my OpenGL sphere?

Update: The map created in QGIS can be applied the Miller Cylindrical Projection. This allows mapping of the natural earth data (which is quite good) to an OpenGL texture map (according to my code). However this map becomes increasingly inaccurate as the poles are approached with respect to latitude.

If any one has any other suggestions, I'm still working on a better solution.

  • What format are the "sphere texture" files in? – csk Apr 4 at 18:41
  • "These maps are simple cylindrical projections, designed to be applied to spheres using spherical projection. If you use any other projection method, the map will appear distorted on the final product." - planetpixelemporium.com/planets.html – csk Apr 4 at 19:18
  • That's just it. I don't know. The type of files, planetpixelemporium.com/earth.html, map accurately to my sphere in OpenGL. The images I produce in QGIS however map in some slanted orientation. The latitude maps correctly but not the longitude. Here I am assuming their is some special process to making spherical texture for OpenGL and I want to know how. – Charles Dake Apr 4 at 19:19
  • So I applied Sphere_Miller_Cylindrical for a coordinate reference system and I got some luck. It is not quite as accurate as the mapping from the site. There cylindrical map was probably chose because it fits a sphere nicely. With what I am using, the latitudes become less accurate as they approach the poles. – Charles Dake Apr 4 at 20:11
  • If your issue is fixed, feel free to post the solution as an answer to help other site visitors with the same issue. If you're not quite satisfied and hope for more help, please update (edit) your question with the information you just mentioned, so others can understand the full question without having to mine the comments for information. Good luck. – csk Apr 4 at 20:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.