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
(unicode 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
-
static
from_json_dict
(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
-
static
from_string
(unicode 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
-
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_cf
(self, bool rotated_pole=False)¶ New in version 3.0.0.
This converts a
pyproj.crs.CoordinateSystem
axis to a list of Climate and Forecast (CF) Version 1.8 dicts.- Parameters
rotated_pole (bool, default=False) – If True, the geographic coordinates are on a rotated pole grid. This corresponds to the rotated_latitude_longitude grid_mapping_name.
- Returns
CF-1.8 version of the CoordinateSystem.
- Return type
List[dict]
-
to_json
(self, bool pretty=False, int indentation=2)¶ New in version 2.4.0.
Convert the object to a JSON string.
- Parameters
pretty (bool, default=False) – If True, it will set the output to be a multiline string.
indentation (int, default=2) – If pretty is True, it will set the width of the indentation.
- 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
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.
- Returns
- Return type
str
-
Axis¶
Ellipsoidal2DCS¶
-
class
pyproj.crs.coordinate_system.
Ellipsoidal2DCS
(axis: Union[pyproj.crs.enums.Ellipsoidal2DCSAxis, str] = <Ellipsoidal2DCSAxis.LONGITUDE_LATITUDE: 'LONGITUDE_LATITUDE'>)[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. Default ispyproj.crs.enums.Ellipsoidal2DCSAxis.LONGITUDE_LATITUDE
.
-
static
Ellipsoidal3DCS¶
-
class
pyproj.crs.coordinate_system.
Ellipsoidal3DCS
(axis: Union[pyproj.crs.enums.Ellipsoidal3DCSAxis, str] = <Ellipsoidal3DCSAxis.LONGITUDE_LATITUDE_HEIGHT: 'LONGITUDE_LATITUDE_HEIGHT'>)[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. Default ispyproj.crs.enums.Ellipsoidal3DCSAxis.LONGITUDE_LATITUDE_HEIGHT
.
-
static
Cartesian2DCS¶
-
class
pyproj.crs.coordinate_system.
Cartesian2DCS
(axis: Union[pyproj.crs.enums.Cartesian2DCSAxis, str] = <Cartesian2DCSAxis.EASTING_NORTHING: 'EASTING_NORTHING'>)[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. Default ispyproj.crs.enums.Cartesian2DCSAxis.EASTING_NORTHING
.
-
static
VerticalCS¶
-
class
pyproj.crs.coordinate_system.
VerticalCS
(axis: Union[pyproj.crs.enums.VerticalCSAxis, str] = <VerticalCSAxis.GRAVITY_HEIGHT: 'GRAVITY_HEIGHT'>)[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. Default ispyproj.crs.enums.VerticalCSAxis.GRAVITY_HEIGHT
.
-
static