Feature interface (cartopy.feature)#

This module defines a Feature interface, which can be used and extended to add various “features” to geoaxes using ax.add_feature(), such as Shapely objects and Natural Earth Imagery.

The default zorder for Cartopy features is defined in defined in FeatureArtist as 1.5, which puts them above images and patches, but below lines and text.

Feature attributes#

Some commonly used features are stored as attributes in the feature module for ease of use.


A dictionary of colors useful for drawing Features.


AdaptiveScaler for NaturalEarthFeature.


Automatically scaled country boundaries.


Automatically scaled state and province boundaries.


Automatically scaled coastline, including major islands.


Automatically scaled natural and artificial lakes.


Automatically scaled land polygons, including major islands.


Automatically scaled ocean polygons.


Automatically scaled single-line drainages, including lake centerlines.

Feature classes#

AdaptiveScaler(default_scale, limits)

Automatically select scale of geometries based on extent of plotted axes.

Feature(crs, **kwargs)

Represents a collection of points, lines and polygons with convenience methods for common drawing and filtering operations.

GSHHSFeature([scale, levels])

An interface to the GSHHS dataset.

NaturalEarthFeature(category, name, scale, ...)

A simple interface to Natural Earth shapefiles.


General object for handling the scale of the geometries used in a Feature.

ShapelyFeature(geometries, crs, **kwargs)

A class capable of drawing a collection of shapely geometries.

WFSFeature(wfs, features, **kwargs)

A class capable of drawing a collection of geometries obtained from an OGC Web Feature Service (WFS).

nightshade.Nightshade([date, delta, ...])

Shade the darkside of the Earth, accounting for refraction.