cartopy.feature.nightshade.Nightshade

class cartopy.feature.nightshade.Nightshade(date=None, delta=0.1, refraction=- 0.83, color='k', alpha=0.5, **kwargs)[source]
__init__(date=None, delta=0.1, refraction=- 0.83, color='k', alpha=0.5, **kwargs)[source]

Shade the darkside of the Earth, accounting for refraction.

Parameters
  • date (datetime) – A UTC datetime object used to calculate the position of the sun. Default: datetime.datetime.utcnow()

  • delta (float) – Stepsize in degrees to determine the resolution of the night polygon feature (npts = 180 / delta).

  • refraction (float) – The adjustment in degrees due to refraction, thickness of the solar disc, elevation etc…

Note

Matplotlib keyword arguments can be used when drawing the feature. This allows standard Matplotlib control over aspects such as ‘color’, ‘alpha’, etc.

Methods

__init__([date, delta, refraction, color, alpha])

Shade the darkside of the Earth, accounting for refraction.

geometries()

Return an iterator of (shapely) geometries for this feature.

intersecting_geometries(extent)

Return an iterator of shapely geometries that intersect with the given extent.

Attributes

crs

The cartopy CRS for the geometries in this feature.

kwargs

The read-only dictionary of keyword arguments that are used when creating the Matplotlib artists for this feature.