[GIS] Calculating distortion on Equirectangular Projection

coordinate systemsoftware-recommendations

I am trying to calculate distortion so I can distort overlaying text and forms to precisely match an image of an equirectangular projection.

How does one calculate the distortion at a given latitude on an equirectangular projection 1:45,000,000 (say, 2000 pixels wide x 1000 pixels high)?

I've been trying to figure out this post and its links to no avail:
How to create an accurate Tissot Indicatrix?

I am not a professional, just a very interested amateur.


Here's the long story.

I am visualizing/mapping data using the Processing programming language and would like to have the 2D mapped data (different sized fonts and circles) appear undistorted when wrapped to a 3D globe. The data is mapped using equirectangular x, y's and the maps I want to use as backdrops are all this projection, so I'm assuming I want to "match" this distortion (e.g. by calculating distortion via latitude using Tissot equations?). Using the programming language I can precisely distort both the text and the circles. I think all I need are the equations to do it correctly.

Here is the original 2D data map:

enter image description here

When wrapped it looks distorted, like this:

enter image description here

How can I make my 2D image look undistorted when wrapped to the 3D sphere?

For reference, here's the same question asked differently on the Processing forum.


I'm not sure I want to reproject to an orthographic projection. I want my 2D data map to wrap to a 3D sphere model that can be interacted with (i.e. spun).

I am using a 3D modeling program (Cinema 4D) to wrap a sphere with a 2MB "Blue Marble" image (equirectangular projection) from NASA.

When wrapped it appears undistorted from all hemispheres (not just one hemisphere, as an orthographic projection would be?), see: still from 3D model above. (The modeling program is doing the orthographic projection for me as I rotate the object, I suppose.) Therefore, I think that if I distort my 2D data map in a similar way it too will appear undistorted on the 3D sphere. Here's a shot I took with an equation that approximates equirectangular distortion. You'll notice the egg shaped ellipses from the 2D image look like a circle when wrapped to the 3D sphere. Similarly, the Tissot ellipses also appear as circles on the 3D sphere.

Tissot Indicatrix with distorted circles
Distorted circles wrapped to 3D sphere

This is why I was looking at the Tissot equations…to more precisely figure out the distortion of the equirectangular projection at different latitudes so I could distort my overlay accordingly.

Perhaps I should use a GIS program. I just downloaded Cartographica and will see if I can figure it out.

Any Mac software suggestions for someone new undertaking this task?

Best Answer

How can I make my 2D image look undistorted when wrapped to the 3D sphere?

The image coordinates are latitude and longitude, so you either

(a) Unproject it and reproject it using an orthographic or vertical near-side projection (that is, projections that look like the world from space) or

(b) Texture-map it onto a 3D model of a sphere using lat-lon as the texture coordinates and display that sphere with a 3D graphics rendering device.

Most GISes do (a) routinely. To illustrate (b), here is a set of images derived from the "flat" map in the question taken from a viewpoint orbiting the texture-mapped sphere:

World from space

(If you look closely at the rightmost image you can see a prominent meridian through the Pacific Ocean: this is the "seam" formed by wrapping the left and right sides of the map together.)

The basic Mathematica command to produce one of these is

SphericalPlot3D[1, {a, 0, \[Pi]}, {b, 0, 2 \[Pi]}, Mesh -> None, 
 PlotStyle -> {Texture[i]}, TextureCoordinateFunction -> ({#5, -#4} &), 
 Lighting -> {{"Ambient", White}}, 
 Boxed -> False, Axes -> False, Background -> Black]

This reduces the original problem (of drawing "data maps" on a sphere) to generating a map that shows circles correctly. The best projection for this is the Stereographic, because it projects all circles on the sphere--no matter what their size--to circles on the map. Thus one procedure to draw large circles correctly in an Equirectangular projection, as shown in the question, is to create them in a Stereographic projection and then unproject them to geographical coordinates (lat, lon). Using (lon, lat) as (x,y) Cartesian coordinates to make the map is tantamount to the Equirectangular projection and so is suitable for texture-mapping onto the sphere or for applying an Orthographic projection.


Note that Tissot indicatrices are not suitable as a solution: they only represent local distortions of infinitesimal circles. Circles large enough to see at a global scale will no longer even appear circular in most projections: witness their blobby appearance in the map in the question. That's why playing games with projections, as shown here, is essential to a good solution.

Related Question