Coordinate Operations#
CoordinateOperation#
- class pyproj.crs.CoordinateOperation#
New in version 2.2.0.
Coordinate operation for CRS.
- is_instantiable#
If 1, a coordinate operation can be instantiated as a PROJ pipeline. This also checks that referenced grids are available.
- Type:
- has_ballpark_transformation#
If 1, the coordinate operation has a “ballpark” transformation, that is a very approximate one, due to lack of more accurate transformations.
- Type:
- area_of_use#
returns: The area of use object with associated attributes. :rtype: AreaOfUse
- static from_authority(unicode auth_name, code, bool use_proj_alternative_grid_names=False)#
Create a CoordinateOperation from an authority code.
- Parameters:
- Return type:
- static from_epsg(code, bool use_proj_alternative_grid_names=False)#
Create a CoordinateOperation from an EPSG code.
- Parameters:
- Return type:
- static from_json(unicode coordinate_operation_json_str)#
Create CoordinateOperation from a JSON string.
New in version 2.4.0.
- Parameters:
coordinate_operation_json_str (str) – CoordinateOperation JSON string.
- Return type:
- static from_json_dict(dict coordinate_operation_dict)#
Create CoordinateOperation from a JSON dictionary.
New in version 2.4.0.
- Parameters:
coordinate_operation_dict (str) – CoordinateOperation dictionary.
- Return type:
- static from_name(unicode coordinate_operation_name, unicode auth_name=None, coordinate_operation_type=CoordinateOperationType.CONVERSION)#
New in version 2.5.0.
Create a Coordinate Operation from a name.
Examples
UTM zone 14N
- Parameters:
coordinate_operation_name (str) – Coordinate Operation name.
auth_name (str, optional) – The authority name to refine search (e.g. ‘EPSG’). If None, will search all authorities.
coordinate_operation_type (CoordinateOperationType, optional) – The coordinate operation type to create. Default is
pyproj.crs.enums.CoordinateOperationType.CONVERSION
- Return type:
- static from_string(unicode coordinate_operation_string)#
Create a CoordinateOperation from a string.
Example
UTM zone 14N
+proj=utm +zone=14
- Parameters:
coordinate_operation_string (str) – Coordinate operation string.
- Return type:
- classmethod from_user_input(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
An iterable of (“auth_name”, “auth_code”)
An object with a to_json method.
- grids#
returns: The coordinate operation grids. :rtype: list[Grid]
- is_exact_same(self, other)#
Compares projection objects to see if they are exactly the same.
- operations#
New in version 2.4.0.
- Returns:
The operations in a concatenated operation.
- Return type:
- params#
returns: The coordinate operation parameters. :rtype: list[Param]
- to_json(self, bool pretty=False, int indentation=2)#
New in version 2.4.0.
Convert the object to a JSON string.
- to_json_dict(self)#
New in version 2.4.0.
Convert the object to a JSON dictionary.
- Return type:
- to_proj4(self, version=ProjVersion.PROJ_5, bool pretty=False)#
Convert the projection to a PROJ string.
New in version 3.1.0: pretty
- Parameters:
version (pyproj.enums.ProjVersion, default=pyproj.enums.ProjVersion.PROJ_5) – The version of the PROJ string output.
pretty (bool, default=False) – If True, it will set the output to be a multiline string.
- Returns:
The PROJ string.
- 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
New 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:
- towgs84#
returns: A list of 3 or 7 towgs84 values if they exist. :rtype: list[float]
Param#
Grid#
- class pyproj._crs.Grid#
New in version 2.2.0.
Coordinate operation grid.
AlbersEqualAreaConversion#
- class pyproj.crs.coordinate_operation.AlbersEqualAreaConversion(latitude_first_parallel: float, latitude_second_parallel: float, latitude_false_origin: float = 0.0, longitude_false_origin: float = 0.0, easting_false_origin: float = 0.0, northing_false_origin: float = 0.0)[source]#
Bases:
CoordinateOperation
New in version 2.5.0.
Class for constructing the Albers Equal Area Conversion.
- static __new__(cls, latitude_first_parallel: float, latitude_second_parallel: float, latitude_false_origin: float = 0.0, longitude_false_origin: float = 0.0, easting_false_origin: float = 0.0, northing_false_origin: float = 0.0)[source]#
- Parameters:
latitude_first_parallel (float) – First standard parallel (lat_1).
latitude_second_parallel (float) – Second standard parallel (lat_2).
latitude_false_origin (float, default=0.0) – Latitude of projection center (lat_0).
longitude_false_origin (float, default=0.0) – Longitude of projection center (lon_0).
easting_false_origin (float, default=0.0) – False easting (x_0).
northing_false_origin (float, default=0.0) – False northing (y_0).
AzimuthalEquidistantConversion#
- class pyproj.crs.coordinate_operation.AzimuthalEquidistantConversion(latitude_natural_origin: float = 0.0, longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0)[source]#
Bases:
CoordinateOperation
New in version 2.5.0: AzumuthalEquidistantConversion
New in version 3.2.0: AzimuthalEquidistantConversion
Class for constructing the Modified Azimuthal Equidistant conversion.
EquidistantCylindricalConversion#
- class pyproj.crs.coordinate_operation.EquidistantCylindricalConversion(latitude_first_parallel: float = 0.0, latitude_natural_origin: float = 0.0, longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0)[source]#
Bases:
CoordinateOperation
New in version 2.5.0.
Class for constructing the Equidistant Cylintrical (Plate Carrée) conversion.
- static __new__(cls, latitude_first_parallel: float = 0.0, latitude_natural_origin: float = 0.0, longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0)[source]#
- Parameters:
latitude_first_parallel (float, default=0.0) – Latitude of 1st standard parallel (lat_ts).
latitude_natural_origin (float, default=0.0) – Longitude of projection center (lon_0).
longitude_natural_origin (float, default=0.0) – Longitude of projection center (lon_0).
false_easting (float, default=0.0) – False easting (x_0).
false_northing (float, default=0.0) – False northing (y_0).
GeostationarySatelliteConversion#
- class pyproj.crs.coordinate_operation.GeostationarySatelliteConversion(sweep_angle_axis: str, satellite_height: float, latitude_natural_origin: float = 0.0, longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0)[source]#
Bases:
CoordinateOperation
New in version 2.5.0.
Class for constructing the Geostationary Satellite conversion.
- static __new__(cls, sweep_angle_axis: str, satellite_height: float, latitude_natural_origin: float = 0.0, longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0)[source]#
- Parameters:
sweep_angle_axis (str) – Sweep angle axis of the viewing instrument. Valid options are “X” and “Y”.
satellite_height (float) – Satellite height.
latitude_natural_origin (float, default=0.0) – Latitude of projection center (lat_0).
longitude_natural_origin (float, default=0.0) – Longitude of projection center (lon_0).
false_easting (float, default=0.0) – False easting (x_0).
false_northing (float, default=0.0) – False northing (y_0).
LambertAzimuthalEqualAreaConversion#
- class pyproj.crs.coordinate_operation.LambertAzimuthalEqualAreaConversion(latitude_natural_origin: float = 0.0, longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0)[source]#
Bases:
CoordinateOperation
New in version 2.5.0: LambertAzumuthalEqualAreaConversion
New in version 3.2.0: LambertAzimuthalEqualAreaConversion
Class for constructing the Lambert Azimuthal Equal Area conversion.
LambertConformalConic1SPConversion#
- class pyproj.crs.coordinate_operation.LambertConformalConic1SPConversion(latitude_natural_origin: float = 0.0, longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0, scale_factor_natural_origin: float = 1.0)[source]#
Bases:
CoordinateOperation
New in version 2.5.0.
Class for constructing the Lambert Conformal Conic 1SP conversion.
- static __new__(cls, latitude_natural_origin: float = 0.0, longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0, scale_factor_natural_origin: float = 1.0)[source]#
- Parameters:
latitude_natural_origin (float, default=0.0) – Latitude of projection center (lat_0).
longitude_natural_origin (float, default=0.0) – Longitude of projection center (lon_0).
false_easting (float, default=0.0) – False easting (x_0).
false_northing (float, default=0.0) – False northing (y_0).
scale_factor_natural_origin (float, default=1.0) – Scale factor at natural origin (k_0).
LambertConformalConic2SPConversion#
- class pyproj.crs.coordinate_operation.LambertConformalConic2SPConversion(latitude_first_parallel: float, latitude_second_parallel: float, latitude_false_origin: float = 0.0, longitude_false_origin: float = 0.0, easting_false_origin: float = 0.0, northing_false_origin: float = 0.0)[source]#
Bases:
CoordinateOperation
New in version 2.5.0.
Class for constructing the Lambert Conformal Conic 2SP conversion.
- static __new__(cls, latitude_first_parallel: float, latitude_second_parallel: float, latitude_false_origin: float = 0.0, longitude_false_origin: float = 0.0, easting_false_origin: float = 0.0, northing_false_origin: float = 0.0)[source]#
- Parameters:
latitude_first_parallel (float) – Latitude of 1st standard parallel (lat_1).
latitude_second_parallel (float) – Latitude of 2nd standard parallel (lat_2).
latitude_false_origin (float, default=0.0) – Latitude of projection center (lat_0).
longitude_false_origin (float, default=0.0) – Longitude of projection center (lon_0).
easting_false_origin (float, default=0.0) – False easting (x_0).
northing_false_origin (float, default=0.0) – False northing (y_0).
LambertCylindricalEqualAreaConversion#
- class pyproj.crs.coordinate_operation.LambertCylindricalEqualAreaConversion(latitude_first_parallel: float = 0.0, longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0)[source]#
Bases:
CoordinateOperation
New in version 2.5.0.
Class for constructing the Lambert Cylindrical Equal Area conversion.
- class pyproj.crs.coordinate_operation.LambertCylindricalEqualAreaScaleConversion(longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0, scale_factor_natural_origin: float = 1.0)[source]#
New in version 2.5.0.
Class for constructing the Lambert Cylindrical Equal Area conversion.
This version uses the scale factor and differs from the official version.
The scale factor will be converted to the Latitude of 1st standard parallel (lat_ts) when exporting to WKT in PROJ>=7.0.0. Previous version will export it as a PROJ-based coordinate operation in the WKT.
- Members:
- Show-inheritance:
- Special-members:
__new__
MercatorAConversion#
- class pyproj.crs.coordinate_operation.MercatorAConversion(latitude_natural_origin: float = 0.0, longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0, scale_factor_natural_origin: float = 1.0)[source]#
Bases:
CoordinateOperation
New in version 2.5.0.
Class for constructing the Mercator (variant A) conversion.
- static __new__(cls, latitude_natural_origin: float = 0.0, longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0, scale_factor_natural_origin: float = 1.0)[source]#
- Parameters:
latitude_natural_origin (float, default=0.0) – Latitude of natural origin (lat_0). Must be 0 by this conversion’s definition.
longitude_natural_origin (float, default=0.0) – Longitude of natural origin (lon_0).
false_easting (float, default=0.0) – False easting (x_0).
false_northing (float, default=0.0) – False northing (y_0).
scale_factor_natural_origin (float, default=1.0) – Scale factor at natural origin (k or k_0).
MercatorBConversion#
- class pyproj.crs.coordinate_operation.MercatorBConversion(latitude_first_parallel: float = 0.0, longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0)[source]#
Bases:
CoordinateOperation
New in version 2.5.0.
Class for constructing the Mercator (variant B) conversion.
HotineObliqueMercatorBConversion#
- class pyproj.crs.coordinate_operation.HotineObliqueMercatorBConversion(latitude_projection_centre: float, longitude_projection_centre: float, azimuth_initial_line: float, angle_from_rectified_to_skew_grid: float, scale_factor_on_initial_line: float = 1.0, easting_projection_centre: float = 0.0, northing_projection_centre: float = 0.0)[source]#
Bases:
CoordinateOperation
New in version 2.5.0.
Class for constructing the Hotine Oblique Mercator (variant B) conversion.
- static __new__(cls, latitude_projection_centre: float, longitude_projection_centre: float, azimuth_initial_line: float, angle_from_rectified_to_skew_grid: float, scale_factor_on_initial_line: float = 1.0, easting_projection_centre: float = 0.0, northing_projection_centre: float = 0.0)[source]#
- Parameters:
latitude_projection_centre (float) – Latitude of projection centre (lat_0).
longitude_projection_centre (float) – Longitude of projection centre (lonc).
azimuth_initial_line (float) – Azimuth of initial line (alpha).
angle_from_rectified_to_skew_grid (float) – Angle from Rectified to Skew Grid (gamma).
scale_factor_on_initial_line (float, default=1.0) – Scale factor on initial line (k or k_0).
easting_projection_centre (float, default=0.0) – Easting at projection centre (x_0).
northing_projection_centre (float, default=0.0) – Northing at projection centre (y_0).
OrthographicConversion#
- class pyproj.crs.coordinate_operation.OrthographicConversion(latitude_natural_origin: float = 0.0, longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0)[source]#
Bases:
CoordinateOperation
New in version 2.5.0.
Class for constructing the Orthographic conversion.
PlateCarreeConversion#
- pyproj.crs.coordinate_operation.PlateCarreeConversion#
alias of
EquidistantCylindricalConversion
PolarStereographicAConversion#
- class pyproj.crs.coordinate_operation.PolarStereographicAConversion(latitude_natural_origin: float, longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0, scale_factor_natural_origin: float = 1.0)[source]#
Bases:
CoordinateOperation
New in version 2.5.0.
Class for constructing the Polar Stereographic A conversion.
- static __new__(cls, latitude_natural_origin: float, longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0, scale_factor_natural_origin: float = 1.0)[source]#
- Parameters:
latitude_natural_origin (float) – Latitude of natural origin (lat_0). Either +90 or -90.
longitude_natural_origin (float, default=0.0) – Longitude of natural origin (lon_0).
false_easting (float, default=0.0) – False easting (x_0).
false_northing (float, default=0.0) – False northing (y_0).
scale_factor_natural_origin (float, default=0.0) – Scale factor at natural origin (k or k_0).
PolarStereographicBConversion#
- class pyproj.crs.coordinate_operation.PolarStereographicBConversion(latitude_standard_parallel: float = 0.0, longitude_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0)[source]#
Bases:
CoordinateOperation
New in version 2.5.0.
Class for constructing the Polar Stereographic B conversion.
SinusoidalConversion#
- class pyproj.crs.coordinate_operation.SinusoidalConversion(longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0)[source]#
Bases:
CoordinateOperation
New in version 2.5.0.
Class for constructing the Sinusoidal conversion.
StereographicConversion#
- class pyproj.crs.coordinate_operation.StereographicConversion(latitude_natural_origin: float = 0.0, longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0, scale_factor_natural_origin: float = 1.0)[source]#
Bases:
CoordinateOperation
New in version 2.5.0.
Class for constructing the Stereographic conversion.
- static __new__(cls, latitude_natural_origin: float = 0.0, longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0, scale_factor_natural_origin: float = 1.0)[source]#
- Parameters:
latitude_natural_origin (float, default=0.0) – Latitude of natural origin (lat_0).
longitude_natural_origin (float, default=0.0) – Longitude of natural origin (lon_0).
false_easting (float, default=0.0) – False easting (x_0).
false_northing (float, default=0.0) – False northing (y_0).
scale_factor_natural_origin (float, default=1.0) – Scale factor at natural origin (k or k_0).
UTMConversion#
- class pyproj.crs.coordinate_operation.UTMConversion(zone: str, hemisphere: str = 'N')[source]#
Bases:
CoordinateOperation
New in version 2.5.0.
Class for constructing the UTM conversion.
TransverseMercatorConversion#
- class pyproj.crs.coordinate_operation.TransverseMercatorConversion(latitude_natural_origin: float = 0.0, longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0, scale_factor_natural_origin: float = 1.0)[source]#
Bases:
CoordinateOperation
New in version 2.5.0.
Class for constructing the Transverse Mercator conversion.
- static __new__(cls, latitude_natural_origin: float = 0.0, longitude_natural_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0, scale_factor_natural_origin: float = 1.0)[source]#
- Parameters:
latitude_natural_origin (float, default=0.0) – Latitude of projection center (lat_0).
longitude_natural_origin (float, default=0.0) – Longitude of projection center (lon_0).
false_easting (float, default=0.0) – False easting (x_0).
false_northing (float, default=0.0) – False northing (y_0).
scale_factor_natural_origin (float, default=1.0) – Scale factor at natural origin (k or k_0).
VerticalPerspectiveConversion#
- class pyproj.crs.coordinate_operation.VerticalPerspectiveConversion(viewpoint_height: float, latitude_topocentric_origin: float = 0.0, longitude_topocentric_origin: float = 0.0, ellipsoidal_height_topocentric_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0)[source]#
Bases:
CoordinateOperation
New in version 2.5.0.
Class for constructing the Vetical Perspective conversion.
- static __new__(cls, viewpoint_height: float, latitude_topocentric_origin: float = 0.0, longitude_topocentric_origin: float = 0.0, ellipsoidal_height_topocentric_origin: float = 0.0, false_easting: float = 0.0, false_northing: float = 0.0)[source]#
- Parameters:
viewpoint_height (float) – Viewpoint height (h).
latitude_topocentric_origin (float, default=0.0) – Latitude of topocentric origin (lat_0).
longitude_topocentric_origin (float, default=0.0) – Longitude of topocentric origin (lon_0).
ellipsoidal_height_topocentric_origin (float, default=0.0) – Ellipsoidal height of topocentric origin.
false_easting (float, default=0.0) – False easting (x_0).
false_northing (float, default=0.0) – False northing (y_0).
RotatedLatitudeLongitudeConversion#
- class pyproj.crs.coordinate_operation.RotatedLatitudeLongitudeConversion(o_lat_p: float, o_lon_p: float, lon_0: float = 0.0)[source]#
Bases:
CoordinateOperation
New in version 2.5.0.
Class for constructing the Rotated Latitude Longitude conversion.
PoleRotationNetCDFCFConversion#
- class pyproj.crs.coordinate_operation.PoleRotationNetCDFCFConversion(grid_north_pole_latitude: float, grid_north_pole_longitude: float, north_pole_grid_longitude: float = 0.0)[source]#
Bases:
CoordinateOperation
New in version 3.3.0.
Class for constructing the Pole rotation (netCDF CF convention) conversion.
http://cfconventions.org/cf-conventions/cf-conventions.html#_rotated_pole
- static __new__(cls, grid_north_pole_latitude: float, grid_north_pole_longitude: float, north_pole_grid_longitude: float = 0.0)[source]#
- Parameters:
grid_north_pole_latitude (float) – Latitude of the North pole of the unrotated source CRS, expressed in the rotated geographic CRS (o_lat_p)
grid_north_pole_longitude (float) – Longitude of projection center (lon_0 - 180).
north_pole_grid_longitude (float, default=0.0) – Longitude of the North pole of the unrotated source CRS, expressed in the rotated geographic CRS (o_lon_p).
ToWGS84Transformation#
- class pyproj.crs.coordinate_operation.ToWGS84Transformation(source_crs: Any, x_axis_translation: float = 0, y_axis_translation: float = 0, z_axis_translation: float = 0, x_axis_rotation: float = 0, y_axis_rotation: float = 0, z_axis_rotation: float = 0, scale_difference: float = 0)[source]#
Bases:
CoordinateOperation
New in version 2.5.0.
Class for constructing the ToWGS84 Transformation.
- static __new__(cls, source_crs: Any, x_axis_translation: float = 0, y_axis_translation: float = 0, z_axis_translation: float = 0, x_axis_rotation: float = 0, y_axis_rotation: float = 0, z_axis_rotation: float = 0, scale_difference: float = 0)[source]#
- Parameters:
source_crs (Any) – Input to create the Source CRS.
x_axis_translation (float, default=0.0) – X-axis translation.
y_axis_translation (float, default=0.0) – Y-axis translation.
z_axis_translation (float, default=0.0) – Z-axis translation.
x_axis_rotation (float, default=0.0) – X-axis rotation.
y_axis_rotation (float, default=0.0) – Y-axis rotation.
z_axis_rotation (float, default=0.0) – Z-axis rotation.
scale_difference (float, default=0.0) – Scale difference.