cartopy.mpl.geoaxes.InterProjectionTransform#

class cartopy.mpl.geoaxes.InterProjectionTransform(source_projection, target_projection)[source]#

Bases: Transform

Transform coordinates from the source_projection to the target_projection.

Create the transform object from the given projections.

Parameters:
  • source_projection – A CRS.

  • target_projection – A CRS.

has_inverse = True#

True if this transform has a corresponding inverse transform.

input_dims = 2#

The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.

inverted()[source]#
Returns:

InterProjectionTransform – A Matplotlib Transform from target to source coordinates.

is_separable = False#

True if this transform is separable in the x- and y- dimensions.

output_dims = 2#

The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.

transform_non_affine(xy)[source]#

Transform from source to target coordinates.

Parameters:

xy – An (n,2) array of points in source coordinates.

Returns:

x, y – An (n,2) array of transformed points in target coordinates.

transform_path_non_affine(src_path)[source]#

Transform from source to target coordinates.

Cache results, so subsequent calls with the same src_path argument (and the same source and target projections) are faster.

Parameters:

src_path – A Matplotlib Path object with vertices in source coordinates.

Returns:

result – A Matplotlib Path with vertices in target coordinates.