cartopy.crs.Projection#

class cartopy.crs.Projection(*args, **kwargs)[source]#

Bases: CRS

Define a projected coordinate system with flat topology and Euclidean distance.

Parameters:
  • proj4_params (iterable of key-value pairs) – The proj4 parameters required to define the desired CRS. The parameters should not describe the desired elliptic model, instead create an appropriate Globe instance. The proj4_params parameters will override any parameters that the Globe defines.

  • globe (Globe instance, optional) – If omitted, the default Globe instance will be created. See Globe for details.

project_geometry(geometry, src_crs=None)[source]#

Project the given geometry into this projection.

Parameters:
  • geometry – The geometry to (re-)project.

  • src_crs (optional) –

    The source CRS. Defaults to None.

    If src_crs is None, the source CRS is assumed to be a geodetic version of the target CRS.

Returns:

geometry – The projected result (a shapely geometry).

quick_vertices_transform(vertices, src_crs)[source]#

Where possible, return a vertices array transformed to this CRS from the given vertices array of shape (n, 2) and the source CRS.

Note

This method may return None to indicate that the vertices cannot be transformed quickly, and a more complex geometry transformation is required (see cartopy.crs.Projection.project_geometry()).