World major rivers

In [1]:
%matplotlib inline
import cartopy.crs as ccrs
import matplotlib.pyplot as plt

from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER


def plot_wmts(url, layer_name, extent, figsize=(9, 7)):
    subplot_kw = dict(projection=ccrs.PlateCarree())
    fig, ax = plt.subplots(figsize=figsize, subplot_kw=subplot_kw)
    ax.set_extent(extent)
    ax.add_wmts(url, layer_name)
    gl = ax.gridlines(draw_labels=True)
    gl.xlines = gl.ylines = False
    gl.xlabels_top = gl.ylabels_right = False
    gl.xformatter = LONGITUDE_FORMATTER
    gl.yformatter = LATITUDE_FORMATTER
    return fig, ax
In [2]:
url = 'http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi'
layer_name = 'BlueMarble_ShadedRelief_Bathymetry'
dx = dy = 5

Amazon river delta

In [3]:
lon = -(50 + 5/60. + 22/60./60.)
lat = -(0 + 42/60. + 28/60./60.)


fig, ax = plot_wmts(
    url,
    layer_name=layer_name,
    extent=[lon-dx, lon+dx, lat-dy, lat+dy]
)

png

Mississippi

In [4]:
lon = -(89 + 15/60. + 12/60./60.)
lat = 29 + 9/60. + 4/60./60.
dx = dy = 5

fig, ax = plot_wmts(
    url,
    layer_name=layer_name,
    extent=[lon-dx, lon+dx, lat-dy, lat+dy]
)

png

La Plata

In [5]:
lon = -(55 + 47/60.)
lat = -(35 + 40/60.)
dx = dy = 5

fig, ax = plot_wmts(
    url,
    layer_name=layer_name,
    extent=[lon-dx, lon+dx, lat-dy, lat+dy]
)

png

Congo

In [6]:
lon = (12 + 27/60.)
lat = -(6 + 4/60. + 45/60.)
dx = dy = 5

fig, ax = plot_wmts(
    url,
    layer_name=layer_name,
    extent=[lon-dx, lon+dx, lat-dy, lat+dy]
)

png

Ganges

In [7]:
lon = (90 + 50/60.)
lat = (22 + 5/60.)
dx = dy = 5

fig, ax = plot_wmts(
    url,
    layer_name=layer_name,
    extent=[lon-dx, lon+dx, lat-dy, lat+dy]
)

png

Indus

In [8]:
lon = (67 + 25/60. + 51/60./60.)
lat = (23 + 59/60. + 40/60./60)
dx = dy = 5

fig, ax = plot_wmts(
    url,
    layer_name=layer_name,
    extent=[lon-dx, lon+dx, lat-dy, lat+dy]
)

png