cartopy.feature.nightshade.Nightshade#

class cartopy.feature.nightshade.Nightshade(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.

property crs#

The cartopy CRS for the geometries in this feature.

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. The extent is assumed to be in the CRS of the feature. If extent is None, the method returns all geometries for this dataset.

property kwargs#

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