Coordinate Systems¶
CoordinateSystem¶
- class pyproj.crs.CoordinateSystem¶
Added in version 2.2.0.
Coordinate System for CRS
- axis_list¶
returns: The Axis list for the coordinate system. :rtype: list[Axis]
- static from_json(unicode coordinate_system_json_str)¶
Added in version 2.5.0.
Create Coordinate System from a JSON string.
- Parameters:
coordinate_system_json_str (str) – Coordinate System JSON string.
- Return type:
- static from_json_dict(dict coordinate_system_dict)¶
Added in version 2.5.0.
Create Coordinate System from a JSON dictionary.
- Parameters:
coordinate_system_dict (str) – Coordinate System dictionary.
- Return type:
- static from_string(unicode coordinate_system_string)¶
Added 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.
- Return type:
- classmethod from_user_input(cls, user_input)¶
Added 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
An iterable of (“auth_name”, “auth_code”)
An object with a to_json method.
- is_exact_same(self, other)¶
Compares projection objects to see if they are exactly the same.
- to_cf(self, bool rotated_pole=False)¶
Added in version 3.0.0.
This converts a
pyproj.crs.CoordinateSystem
axis to a list of Climate and Forecast (CF) Version 1.8 dicts.
- to_json(self, bool pretty=False, int indentation=2)¶
Added in version 2.4.0.
Convert the object to a JSON string.
- to_json_dict(self)¶
Added in version 2.4.0.
Convert the object to a JSON dictionary.
- Return type:
- to_wkt(self, version=WktVersion.WKT2_2019, pretty=False, output_axis_rule=None)¶
Convert the projection to a WKT string.
- Version options:
WKT2_2015
WKT2_2015_SIMPLIFIED
WKT2_2019
WKT2_2019_SIMPLIFIED
WKT1_GDAL
WKT1_ESRI
Added in version 3.6.0: output_axis_rule
- Parameters:
version (pyproj.enums.WktVersion, default=pyproj.enums.WktVersion.WKT2_2019) – The version of the WKT output.
pretty (bool, default=False) – If True, it will set the output to be a multiline string.
output_axis_rule (bool, optional, default=None) – If True, it will set the axis rule on any case. If false, never. None for AUTO, that depends on the CRS and version.
- Return type:
Axis¶
Ellipsoidal2DCS¶
- class pyproj.crs.coordinate_system.Ellipsoidal2DCS(axis: Ellipsoidal2DCSAxis | str = Ellipsoidal2DCSAxis.LONGITUDE_LATITUDE)[source]¶
Bases:
CoordinateSystem
Added in version 2.5.0.
This generates an Ellipsoidal 2D Coordinate System
- static __new__(cls, axis: Ellipsoidal2DCSAxis | str = Ellipsoidal2DCSAxis.LONGITUDE_LATITUDE)[source]¶
- Parameters:
axis (
pyproj.crs.enums.Ellipsoidal2DCSAxis
or str, optional) – This is the axis order of the coordinate system. Default ispyproj.crs.enums.Ellipsoidal2DCSAxis.LONGITUDE_LATITUDE
.
Ellipsoidal3DCS¶
- class pyproj.crs.coordinate_system.Ellipsoidal3DCS(axis: Ellipsoidal3DCSAxis | str = Ellipsoidal3DCSAxis.LONGITUDE_LATITUDE_HEIGHT)[source]¶
Bases:
CoordinateSystem
Added in version 2.5.0.
This generates an Ellipsoidal 3D Coordinate System
- static __new__(cls, axis: Ellipsoidal3DCSAxis | str = Ellipsoidal3DCSAxis.LONGITUDE_LATITUDE_HEIGHT)[source]¶
- Parameters:
axis (
pyproj.crs.enums.Ellipsoidal3DCSAxis
or str, optional) – This is the axis order of the coordinate system. Default ispyproj.crs.enums.Ellipsoidal3DCSAxis.LONGITUDE_LATITUDE_HEIGHT
.
Cartesian2DCS¶
- class pyproj.crs.coordinate_system.Cartesian2DCS(axis: Cartesian2DCSAxis | str = Cartesian2DCSAxis.EASTING_NORTHING)[source]¶
Bases:
CoordinateSystem
Added in version 2.5.0.
This generates an Cartesian 2D Coordinate System
- static __new__(cls, axis: Cartesian2DCSAxis | str = Cartesian2DCSAxis.EASTING_NORTHING)[source]¶
- Parameters:
axis (
pyproj.crs.enums.Cartesian2DCSAxis
or str, optional) – This is the axis order of the coordinate system. Default ispyproj.crs.enums.Cartesian2DCSAxis.EASTING_NORTHING
.
VerticalCS¶
- class pyproj.crs.coordinate_system.VerticalCS(axis: VerticalCSAxis | str = VerticalCSAxis.GRAVITY_HEIGHT)[source]¶
Bases:
CoordinateSystem
Added in version 2.5.0.
This generates an Vertical Coordinate System
- static __new__(cls, axis: VerticalCSAxis | str = VerticalCSAxis.GRAVITY_HEIGHT)[source]¶
- Parameters:
axis (
pyproj.crs.enums.VerticalCSAxis
or str, optional) – This is the axis direction of the coordinate system. Default ispyproj.crs.enums.VerticalCSAxis.GRAVITY_HEIGHT
.