cartopy.crs.CRS#

class cartopy.crs.CRS(proj4_params, globe=None)[source]#

Define a Coordinate Reference System using proj.

__init__(proj4_params, globe=None)[source]#
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.

Methods

__init__(proj4_params[, globe])

param proj4_params:

The proj4 parameters required to define the

as_geocentric()

Return a new Geocentric CRS with the same ellipse/datum as this CRS.

as_geodetic()

Return a new Geodetic CRS with the same ellipse/datum as this CRS.

cs_to_cf()

New in version 3.0.0.

equals(other[, ignore_axis_order])

New in version 2.5.0.

from_authority(auth_name, code)

New in version 2.2.0.

from_cf(in_cf[, ellipsoidal_cs, ...])

New in version 2.2.0.

from_dict(proj_dict)

New in version 2.2.0.

from_epsg(code)

Make a CRS from an EPSG code

from_json(crs_json)

New in version 2.4.0.

from_json_dict(crs_dict)

New in version 2.4.0.

from_proj4(in_proj_string)

New in version 2.2.0.

from_string(in_crs_string)

Make a CRS from:

from_user_input(value, **kwargs)

Initialize a CRS class instance with:

from_wkt(in_wkt_string)

New in version 2.2.0.

get_geod()

returns:

pyproj.geod.Geod -- Geod object based on the ellipsoid.

is_exact_same(other)

Check if the CRS objects are the exact same.

is_geodetic()

list_authority([auth_name, min_confidence])

New in version 3.2.0.

to_3d([name])

New in version 3.1.0.

to_authority([auth_name, min_confidence])

New in version 2.2.0.

to_cf([wkt_version, errcheck])

New in version 2.2.0.

to_dict()

New in version 2.2.0.

to_epsg([min_confidence])

Return the EPSG code best matching the CRS or None if it a match is not found.

to_json([pretty, indentation])

New in version 2.4.0.

to_json_dict()

New in version 2.4.0.

to_proj4([version])

Convert the projection to a PROJ string.

to_string()

New in version 2.2.0.

to_wkt([version, pretty])

Convert the projection to a WKT string.

transform_point(x, y, src_crs)

Transform the given float64 coordinate pair, in the given source coordinate system (src_crs), to this coordinate system.

transform_points(src_crs, x, y[, z])

Transform the given coordinates, in the given source coordinate system (src_crs), to this coordinate system.

transform_vectors(src_proj, x, y, u, v)

Transform the given vector components, with coordinates in the given source coordinate system (src_proj), to this coordinate system.

Attributes

area_of_use

returns: AreaOfUse -- The area of use object with associated attributes.

axis_info

Retrieves all relevant axis information in the CRS.

coordinate_operation

New in version 2.2.0.

coordinate_system

New in version 2.2.0.

datum

New in version 2.2.0.

ellipsoid

New in version 2.2.0.

geodetic_crs

New in version 2.2.0.

is_bound

returns: bool -- True if CRS is bound.

is_compound

New in version 3.1.0.

is_derived

New in version 3.2.0.

is_engineering

New in version 2.2.0.

is_geocentric

This checks if the CRS is geocentric and takes into account if the CRS is bound.

is_geographic

This checks if the CRS is geographic.

is_projected

This checks if the CRS is projected.

is_vertical

New in version 2.2.0.

name

returns: str -- The name of the CRS (from proj_get_name()).

prime_meridian

New in version 2.2.0.

proj4_params

remarks

New in version 2.4.0.

scope

New in version 2.4.0.

source_crs

The base CRS of a BoundCRS or a DerivedCRS/ProjectedCRS, or the source CRS of a CoordinateOperation.

sub_crs_list

If the CRS is a compound CRS, it will return a list of sub CRS objects.

target_crs

New in version 2.2.0.

type_name

returns: str -- The name of the type of the CRS object.

utm_zone

New in version 2.6.0.