Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a library, which I inherited, which presents a zoomable representation of the Earth. It's a Mercator projection and is constructed from triangles, the properties of which are stored in binary files.

The surface is built up, for any given view port, by drawing these triangles in an overlapping fashion to produce the image. The definition of each triangle is the lat/long of the vertices.

It looks OK at low values of zoom but looks progressively more ragged as the user zooms in. The view ports are primarily referenced though a rectangle of lat/long co-ordinates.

I'd like to replace it with a better quality approach. The problem is, I don't know where to begin researching the options as I am not familiar either with the projections needed nor the graphics techniques used to render them.

For example, I imagine that I could acquire high resolution images, say Mercator projections although I'm open to anything, break them into tiles and somehow wrap them onto a graphical representation of a sphere.

I'm not asking for "how do I", more where should I begin to understand what might be involved and the techniques I will need to learn.

I am most grateful for any "Earth rendering 101" pointers folks might have.

share|improve this question
It sounds like you want GIS type functionality, with Level of Detail. You also want to parameterize your coordinates to fit a sphere. These are complicated topics, your goals sound very ambitious. Without more detail on your current system, it's hard to advise a direction to go, but I'd say you've got your work cut out for you! – jakev Sep 27 '12 at 16:52
I last had to deal with projections in 1974, but I think you're getting into the Deep End of the Pool®. – Peter Rowell Sep 27 '12 at 16:55
Hmmm. These comments make me think I should lie down for a while. Sounds like I might be trying to open Pandora's box. – Simon Sep 27 '12 at 17:08
Skybox ( – rwong May 19 '15 at 2:29
up vote 4 down vote accepted

Sometimes the correct answer in programming is to not program.

It sounds like your question is in the "expert" level of knowledge for rendering, but neither your skills nor the existing documentation are there to back you in this quest.

As it sounds like you're running solo, I'm willing to guess that the topographical rendering isn't your business' core area. Rather it's something drug along in order to represent what your core capability really is.

Others have solved this problem (topographical rendering) and sell the solution. I'd recommend looking into them. Google Earth is an example as is Microsoft Maps (or whatever it's called now).

I know it's odd on P.SE to recommend against coding, but I think this is a case where you are seriously out of your skill set. You'll have a better solution more quickly by acquiring a 3rd party product instead.

share|improve this answer
Thanks Glen. This is sound advice. I am running solo and it's not core competency. In fact, the only purpose of the library is to enable the user to pan around the globe and select a location which is then passed to my stuff where the fun begins. I think I've seen enough already to question the sanity of embarking on my quest, although one additional requirement, which I did not state in my OP, is that the library should work regardless of network connectivity i.e. self contained. – Simon Sep 27 '12 at 17:05
@Simon - you're welcome. And I'll double down on my advice. Bail on that pile of code and look for off-the-shelf solutions. Both Earth and Maps can do what you're looking for. – GlenH7 Sep 27 '12 at 17:12
+1 Lots of great tools out there. Also ESRI ArcGISExplorer (free) and NASA WorldWind (free) . Working without network connectivity could be challenging for many of these tools. – MarkJ Sep 27 '12 at 20:10
@MarkJ - great additions, thanks! – GlenH7 Sep 27 '12 at 20:11
Thanks Mark for the additional pointers. The library is used in a maritime app and is of most use when approaching a port from sea - hence the no connectivity req't. – Simon Sep 28 '12 at 13:10

Your Answer


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.