Coordinate Operations¶
CoordinateOperation¶
- class pyproj.crs.CoordinateOperation¶
New in version 2.2.0.
Coordinate operation for CRS.
- name¶
The name of the method(projection) with authority information.
- Type
str
- method_name¶
The method (projection) name.
- Type
str
- method_auth_name¶
The method authority name.
- Type
str
- method_code¶
The method code.
- Type
str
- is_instantiable¶
If 1, a coordinate operation can be instantiated as a PROJ pipeline. This also checks that referenced grids are available.
- Type
int
- 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
int
- accuracy¶
The accuracy (in metre) of a coordinate operation.
- Type
float
- area_of_use¶
returns: The area of use object with associated attributes. :rtype: AreaOfUse
- static from_authority(auth_name, code, use_proj_alternative_grid_names=False)¶
Create a CoordinateOperation from an authority code.
- Parameters
auth_name (str) – Name of the authority.
code (str or int) – The code used by the authority.
use_proj_alternative_grid_names (bool, default=False) – Use the PROJ alternative grid names.
- Returns
- Return type
- static from_epsg(code, use_proj_alternative_grid_names=False)¶
Create a CoordinateOperation from an EPSG code.
- Parameters
code (str or int) – The code used by EPSG.
use_proj_alternative_grid_names (bool, default=False) – Use the PROJ alternative grid names.
- Returns
- Return type
- static from_json(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.
- Returns
- Return type
- static from_json_dict(coordinate_operation_dict)¶
Create CoordinateOperation from a JSON dictionary.
New in version 2.4.0.
- Parameters
coordinate_operation_dict (str) – CoordinateOperation dictionary.
- Returns
- Return type
- static from_name(coordinate_operation_name, 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
- Returns
- Return type
- static from_string(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.
- 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
- 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
Tuple[CoordinateOperation]
- params¶
returns: The coordinate operation parameters. :rtype: List[Param]
- 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, 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_proj4(self, version=ProjVersion.PROJ_5, 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
str
- 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
- towgs84¶
returns: A list of 3 or 7 towgs84 values if they exist. :rtype: List[float]
Param¶
- class pyproj._crs.Param¶
New in version 2.2.0.
Coordinate operation parameter.
- name¶
The name of the parameter.
- Type
str
- auth_name¶
The authority name of the parameter (i.e. EPSG).
- Type
str
- code¶
The code of the parameter (i.e. 9807).
- Type
str
- value¶
The value of the parameter.
- Type
str or double
- unit_conversion_factor¶
The factor to convert to meters.
- Type
double
- unit_name¶
The name of the unit.
- Type
str
- unit_auth_name¶
The authority name of the unit (i.e. EPSG).
- Type
str
- unit_code¶
The code of the unit (i.e. 9807).
- Type
str
- unit_category¶
The category of the unit (“unknown”, “none”, “linear”, “angular”, “scale”, “time” or “parametric”).
- Type
str
Grid¶
- class pyproj._crs.Grid¶
New in version 2.2.0.
Coordinate operation grid.
- short_name¶
The short name of the grid.
- Type
str
- full_name¶
The full name of the grid.
- Type
str
- package_name¶
The the package name where the grid might be found.
- Type
str
- url¶
The grid URL or the package URL where the grid might be found.
- Type
str
- direct_download¶
If 1, url can be downloaded directly.
- Type
int
- open_license¶
If 1, the grid is released with an open license.
- Type
int
- available¶
If 1, the grid is available at runtime.
- Type
int
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:
pyproj._crs.CoordinateOperation
New in version 2.5.0.
Class for constructing the Albers Equal Area Conversion.
PROJ docs
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:
pyproj._crs.CoordinateOperation
New in version 2.5.0: AzumuthalEquidistantConversion
New in version 3.2.0: AzimuthalEquidistantConversion
Class for constructing the Modified Azimuthal Equidistant conversion.
PROJ docs
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:
pyproj._crs.CoordinateOperation
New in version 2.5.0.
Class for constructing the Equidistant Cylintrical (Plate Carrée) conversion.
PROJ docs
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:
pyproj._crs.CoordinateOperation
New in version 2.5.0.
Class for constructing the Geostationary Satellite conversion.
PROJ docs
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:
pyproj._crs.CoordinateOperation
New in version 2.5.0: LambertAzumuthalEqualAreaConversion
New in version 3.2.0: LambertAzimuthalEqualAreaConversion
Class for constructing the Lambert Azimuthal Equal Area conversion.
PROJ docs
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:
pyproj._crs.CoordinateOperation
New in version 2.5.0.
Class for constructing the Lambert Conformal Conic 1SP conversion.
PROJ docs
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:
pyproj._crs.CoordinateOperation
New in version 2.5.0.
Class for constructing the Lambert Conformal Conic 2SP conversion.
PROJ docs
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:
pyproj._crs.CoordinateOperation
New in version 2.5.0.
Class for constructing the Lambert Cylindrical Equal Area conversion.
PROJ docs
- 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.
PROJ docs
- 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:
pyproj._crs.CoordinateOperation
New in version 2.5.0.
Class for constructing the Mercator (variant A) conversion.
PROJ docs
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:
pyproj._crs.CoordinateOperation
New in version 2.5.0.
Class for constructing the Mercator (variant B) conversion.
PROJ docs
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:
pyproj._crs.CoordinateOperation
New in version 2.5.0.
Class for constructing the Hotine Oblique Mercator (variant B) conversion.
PROJ docs
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:
pyproj._crs.CoordinateOperation
New in version 2.5.0.
Class for constructing the Orthographic conversion.
PROJ docs
PlateCarreeConversion¶
- pyproj.crs.coordinate_operation.PlateCarreeConversion¶
alias of
pyproj.crs.coordinate_operation.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:
pyproj._crs.CoordinateOperation
New in version 2.5.0.
Class for constructing the Polar Stereographic A conversion.
PROJ docs
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:
pyproj._crs.CoordinateOperation
New in version 2.5.0.
Class for constructing the Polar Stereographic B conversion.
PROJ docs
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:
pyproj._crs.CoordinateOperation
New in version 2.5.0.
Class for constructing the Sinusoidal conversion.
PROJ docs
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:
pyproj._crs.CoordinateOperation
New in version 2.5.0.
Class for constructing the Stereographic conversion.
PROJ docs
UTMConversion¶
- class pyproj.crs.coordinate_operation.UTMConversion(zone: str, hemisphere: str = 'N')[source]¶
Bases:
pyproj._crs.CoordinateOperation
New in version 2.5.0.
Class for constructing the UTM conversion.
PROJ docs
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:
pyproj._crs.CoordinateOperation
New in version 2.5.0.
Class for constructing the Transverse Mercator conversion.
PROJ docs
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:
pyproj._crs.CoordinateOperation
New in version 2.5.0.
Class for constructing the Vetical Perspective conversion.
PROJ docs
RotatedLatitudeLongitudeConversion¶
- class pyproj.crs.coordinate_operation.RotatedLatitudeLongitudeConversion(o_lat_p: float, o_lon_p: float, lon_0: float = 0.0)[source]¶
Bases:
pyproj._crs.CoordinateOperation
New in version 2.5.0.
Class for constructing the Rotated Latitude Longitude conversion.
PROJ docs
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:
pyproj._crs.CoordinateOperation
New in version 2.5.0.
Class for constructing the ToWGS84 Transformation.