Most of us know that the Earth is spherical or, more accurately, an ellipsoid. The fact that we have to represent a curved three-dimensional surface on a two-dimensional sheet of paper or flat screen means that there are some distortions. This method of “projecting” the Earth's surface onto a 2D image is called map projection.
There are hundreds of map projections and each one of them minimizes distortion in it shape, distance, area and direction to varying degrees. However, no map projection can eliminate them all, so understanding the pros and cons of each projection is essential to determining which to use for your project.
Orthographic projection
Mercator projection
Transverse Mercator Projection
Lambert conformal conic projection
Robinson Projection
Summary
To visualize the different projections, we can use Python libraries. matplotlib
and cartopy
.
pip install matplotlib cartopy
The source code for most of the world maps created in this article is provided below.
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import cartopy.feature as feature# fix maplotlib params
plt.rcParams(‘figure.dpi’) = 175
# projections & borders
CRSs = (ccrs.Orthographic(),
ccrs.Orthographic(central_longitude=0, central_latitude=-90),
ccrs.Mercator(),
ccrs.UTM(zone=29),
ccrs.Robinson(),
ccrs.LambertConformal())
borders = ((0, 1, 1, 0.05),
(0, 1, 1, 0.05),
(0, 1, 1, 0.05),
(0, 1, 1, 0.05),
(0.05, 1, 1, 0),
(0, 1, 1, 0))
names = ("ortho", "ortho_southpole", "merca",
"utm", "robin", "lambertc")
dir = "/Users/jake/Desktop/gis"
for crs, br, name in zip(CRSs, borders, names):
fig, ax = plt.subplots(subplot_kw={‘projection’: crs})
projection_name = str(crs).split(" ")(0)
# Draw countries and coastlines
ax.coastlines(linewidth=0.5)…