Introduction to Map Projections with Google Earth Engine: Part 1

Matt Hancher
Google Earth and Earth Engine
5 min readDec 10, 2016

--

The Earth is round, but your computer screen is flat. A map projection describes how points on a plane, such as the pixels on your screen, correspond to points on the surface of the Earth.

Let’s explore how this works using a global land cover dataset known as MCD12Q1, one of many standard data products made with data from NASA’s MODIS satellite instruments. This dataset is easily available in Google Earth Engine, a cloud platform for geospatial data analysis, and if you like you can follow along with this simple script on GitHub to see how I made all the images in this article.

First let’s take a look at this dataset in its native map projection:

The MCD12Q1 land cover dataset for 2012, in its native sinusoidal map projection.

This data uses a sinusoidal projection, which is an example of an equal-area projection: each pixel corresponds to an area of equal size on the surface of the Earth. For that reason, and because of its simple mathematical form, NASA produces and distributes many of its global datasets in this projection. (The square blocks in the oceans represent no-data areas in this particular dataset.)

All data in the Earth Engine public data catalog is stored in its original map projection, in this case sinusoidal. However, you can easily resample the data into other map projections for analysis or visualization. Let’s take a look at this data in a another common projection, the equirectangular projection:

The equirectangular projection, with coordinates that correspond to latitude and longitude.

This projection, sometimes also referred to as plate carrée, is commonly used because the math is especially simple: the axes correspond directly to latitude and longitude. Notice, however, that the areas near the pole appear stretched out horizontally. This projection does not preserve either shapes or areas. There is no perfect way to flatten out a sphere, and so people have created many different map projections over the years, each of which makes different compromises and is appropriate for different uses.

To compensate for this distortion near the poles, you might be inclined to stretch those regions vertically as well. If you do that just right then you get another famous map projection that does preserve local shapes and angles, although it certainly does not preserve areas. This is the Mercator projection:

The familiar Mercator projection, commonly used for maps on web.

This projection radically distorts the relative area of land masses, making regions that are farther from the equator appear much larger than they really are. For example, it makes Greenland appear comparable in size to Africa, when in fact it is only one third the size of Australia! The Mercator projection has its advantages, though, one of which we’ll see shortly.

We’ve been looking at global data, but let’s see what happens when we zoom in on the continental United States. First let’s return to this land cover dataset’s native sinusoidal projection:

The continental US in this land cover data’s native sinusoidal projection.

Clearly the sinusoidal projection is a poor choice for presenting this country-scale data. The situation improves somewhat if we use an equirectangular projection instead:

The continental US in an equirectangular projection.

However, the United States is still visibly stretched horizontally. If you like the simplicity of this projection, and if you are focusing on a local area, then you can approximately counteract this distortion by scaling the entire projection horizontally. If you do this, then any local area also starts to look a lot like the Mercator projection:

The continental US in a Mercator projection.

You may recognize this view of the United States, since it is exactly the projection used by Google Maps and other web mapping services. There is good reason for this. You can derive the Mercator projection from just a few desirable characteristics: north is always up, east is always to the right, and if you zoom into any area the local shapes and angles will be correct. The Mercator projection achieves this local-scale universality at the cost of the significant global-scale distortions that we saw above.

The continental United States is big enough that these area distortions are still significant. In particular, the northern states appear too large relative to the southern states. As a result, maps of the United States usually do not use any of the projections we’ve discussed so far. One common choice is the Albers projection:

The Albers equal-area conic projection, commonly used for the continental US in atlases.

This is another example of an equal-area projection, so it represents the relative areas of all the states accurately. Notice that the northern border of the western US no longer appears as a straight line, even though it runs due east/west. In a sense this is actually a more accurate picture: because of the curvature of the Earth, the shortest path from northern Washington state to northern Minnesota really does pass through Canada.

If you found this interesting, you might enjoy learning even more about these issues in Michael Corey’s Source article, Choosing the Right Map Projection. We’ll dive deeper into the details and look at a few other projections in Part 2.

--

--