In [ ]:
%matplotlib inline
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.PlateCarree())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();
In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.PlateCarree(central_longitude=180))
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();
class cartopy.crs.LambertConformal(central_longitude=-96.0, central_latitude=39.0, false_easting=0.0, false_northing=0.0, secant_latitudes=None, standard_parallels=None, globe=None, cutoff=-30)
A Lambert Conformal conic projection.
Kwargs:
central_longitude - The central longitude. Defaults to 0.
central_latitude - The central latitude. Defaults to 0.
false_easting - X offset from planar origin in metres. Defaults to 0.
false_northing - Y offset from planar origin in metres. Defaults to 0.
standard_parallels - Standard parallel latitude(s). Defaults to (33, 45).
globe - A cartopy.crs.Globe. If omitted, a default globe is created.
cutoff - Latitude of map cutoff. The map extends to infinity opposite the central pole so we must cut off the map drawing before then. A value of 0 will draw half the globe. Defaults to -30.
In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.LambertConformal())
ax.coastlines(resolution='110m')
ax.gridlines();
In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.LambertCylindrical())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();
class cartopy.crs.Mercator(central_longitude=0.0, min_latitude=-80.0, max_latitude=84.0, globe=None)
A Mercator projection.
Kwargs:
central_longitude - the central longitude. Defaults to 0.
min_latitude - the maximum southerly extent of the projection. Defaults to -80 degrees.
max_latitude - the maximum northerly extent of the projection. Defaults to 84 degrees.
globe - A cartopy.crs.Globe. If omitted, a default globe is created.
In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.Mercator())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();
In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.Miller())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();
In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.Mollweide())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();
In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.Orthographic())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();
In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.Robinson())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();
In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.Stereographic())
ax.coastlines(resolution='110m')
ax.gridlines();
class cartopy.crs.TransverseMercator(central_longitude=0.0, central_latitude=0.0, false_easting=0.0, false_northing=0.0, scale_factor=1.0, globe=None)
A Transverse Mercator projection.
Kwargs:
central_longitude - The true longitude of the central meridian in degrees. Defaults to 0.
central_latitude - The true latitude of the planar origin in degrees. Defaults to 0.
false_easting - X offset from the planar origin in metres. Defaults to 0.
false_northing - Y offset from the planar origin in metres. Defaults to 0.
scale_factor - Scale factor at the central meridian. Defaults to 1.
globe - An instance of cartopy.crs.Globe. If omitted, a default globe is created.
In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.TransverseMercator())
ax.coastlines(resolution='110m')
ax.gridlines();
class cartopy.crs.UTM(zone, southern_hemisphere=False, globe=None)
Universal Transverse Mercator projection.
Kwargs:
zone - the numeric zone of the UTM required.
globe - An instance of cartopy.crs.Globe. If omitted, a default globe is created.
southern_hemisphere - set to True if the zone is in the southern hemisphere, defaults to False.
In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.InterruptedGoodeHomolosine())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();
class cartopy.crs.RotatedPole(pole_longitude=0.0, pole_latitude=90.0, central_rotated_longitude=0.0, globe=None)
Defines a rotated latitude/longitude projected coordinate system with cylindrical topology and projected distance.
Coordinates are measured in projection metres.
Create a RotatedPole CRS.
The class uses proj4 to perform an ob_tran operation, using the pole_longitude to set a lon_0 then performing two rotations based on pole_latitude and central_rotated_longitude. This is equivalent to setting the new pole to a location defined by the pole_latitude and pole_longitude values in the GeogCRS defined by globe, then rotating this new CRS about it’s pole using the central_rotated_longitude value.
Args:
pole_longitude - Pole longitude position, in unrotated degrees.
pole_latitude - Pole latitude position, in unrotated degrees.
central_rotated_longitude - Longitude rotation about the new pole, in degrees.
Kwargs:
In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.RotatedPole(pole_latitude=37.5, pole_longitude=177.5))
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();
In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.OSGB())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();
In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.EuroPP())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();
In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.Geostationary())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();
In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.Gnomonic())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();
In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.NorthPolarStereo())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();
In [ ]:
# note:
# coastlines methods can use several resolution (110m, 50m, 10m)
# for convenience here we use 110m
# see :
# ax.coastlines?
In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.OSNI())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();
In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.SouthPolarStereo())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();