Coordinate Systems

CoordinateSystem

class pyproj.crs.CoordinateSystem

New in version 2.2.0.

Coordinate System for CRS

name

The name of the coordinate system.

Type

str

axis_list

returns: The Axis list for the coordinate system. :rtype: list[Axis]

static from_json(coordinate_system_json_str)

New in version 2.5.0.

Create Coordinate System from a JSON string.

Parameters

coordinate_system_json_str (str) – Coordinate System JSON string.

Returns

Return type

CoordinateSystem

static from_json_dict(coordinate_system_dict)

New in version 2.5.0.

Create Coordinate System from a JSON dictionary.

Parameters

coordinate_system_dict (str) – Coordinate System dictionary.

Returns

Return type

CoordinateSystem

static from_string(coordinate_system_string)

New in version 2.5.0.

Note

Only works with PROJ JSON.

Create a Coordinate System from a string.

Parameters

coordinate_system_string (str) – Coordinate System string.

Returns

Return type

CoordinateSystem

from_user_input(type cls, user_input)

New in version 2.5.0.

Create cls from user input:
  • PROJ JSON string

  • PROJ JSON dict

  • WKT string

  • An authority string

  • An EPSG integer code

  • A tuple of (“auth_name”: “auth_code”)

  • An object with a to_json method.

Parameters

user_input (str, dict, int) – Intput to create cls.

Returns

Return type

cls

is_exact_same(self, other)

Compares projection objects to see if they are exactly the same.

remarks

New in version 2.4.0.

Returns

Remarks about object.

Return type

str

scope

New in version 2.4.0.

Returns

Scope of object.

Return type

str

to_json(self, pretty=False, indentation=2)

New in version 2.4.0.

Convert the object to a JSON string.

Parameters
  • pretty (bool) – If True, it will set the output to be a multiline string. Defaults to False.

  • indentation (int) – If pretty is True, it will set the width of the indentation. Default is 2.

Returns

Return type

str

to_json_dict(self)

New in version 2.4.0.

Convert the object to a JSON dictionary.

Returns

Return type

dict

to_wkt(self, version=WktVersion.WKT2_2019, pretty=False)

Convert the projection to a WKT string.

Version options:
  • WKT2_2015

  • WKT2_2015_SIMPLIFIED

  • WKT2_2019

  • WKT2_2019_SIMPLIFIED

  • WKT1_GDAL

  • WKT1_ESRI

Parameters
Returns

Return type

str

Axis

class pyproj._crs.Axis

New in version 2.0.0.

Coordinate System Axis

name
Type

str

abbrev
Type

str

direction
Type

str

unit_conversion_factor
Type

float

unit_name
Type

str

unit_auth_code
Type

str

unit_code
Type

str

Ellipsoidal2DCS

class pyproj.crs.coordinate_system.Ellipsoidal2DCS[source]

Bases: pyproj._crs.CoordinateSystem

New in version 2.5.0.

This generates an Ellipsoidal 2D Coordinate System

static __new__(cls, axis: Union[pyproj.crs.enums.Ellipsoidal2DCSAxis, str] = <Ellipsoidal2DCSAxis.LONGITUDE_LATITUDE: 'LONGITUDE_LATITUDE'>)[source]
Parameters

axis (pyproj.crs.enums.Ellipsoidal2DCSAxis or str, optional) – This is the axis order of the coordinate system.

Ellipsoidal3DCS

class pyproj.crs.coordinate_system.Ellipsoidal3DCS[source]

Bases: pyproj._crs.CoordinateSystem

New in version 2.5.0.

This generates an Ellipsoidal 3D Coordinate System

static __new__(cls, axis: Union[pyproj.crs.enums.Ellipsoidal3DCSAxis, str] = <Ellipsoidal3DCSAxis.LONGITUDE_LATITUDE_HEIGHT: 'LONGITUDE_LATITUDE_HEIGHT'>)[source]
Parameters

axis (pyproj.crs.enums.Ellipsoidal3DCSAxis or str, optional) – This is the axis order of the coordinate system.

Cartesian2DCS

class pyproj.crs.coordinate_system.Cartesian2DCS[source]

Bases: pyproj._crs.CoordinateSystem

New in version 2.5.0.

This generates an Cartesian 2D Coordinate System

static __new__(cls, axis: Union[pyproj.crs.enums.Cartesian2DCSAxis, str] = <Cartesian2DCSAxis.EASTING_NORTHING: 'EASTING_NORTHING'>)[source]
Parameters

axis (pyproj.crs.enums.Cartesian2DCSAxis or str, optional) – This is the axis order of the coordinate system.

VerticalCS

class pyproj.crs.coordinate_system.VerticalCS[source]

Bases: pyproj._crs.CoordinateSystem

New in version 2.5.0.

This generates an Vertical Coordinate System

static __new__(cls, axis: Union[pyproj.crs.enums.VerticalCSAxis, str] = <VerticalCSAxis.GRAVITY_HEIGHT: 'GRAVITY_HEIGHT'>)[source]
Parameters

axis (pyproj.crs.enums.VerticalCSAxis or str, optional) – This is the axis direction of the coordinate system.