Package pygeodesy3 :: Package projections
[frames] | no frames]

Package projections

Various earth projections.


Version: 23.12.18

Submodules

Classes
  Aer
Local Azimuth-Elevation-Range (AER) in a local tangent plane.
  Aer4Tuple
4-Tuple (azimuth, elevation, slantrange, ltp), all in meter except ltp.
  Albers7Tuple
7-Tuple (x, y, lat, lon, gamma, scale, datum), in meter, meter, degrees90, degrees180, degrees360, scalar and Datum where (x, y) is the projected, (lat, lon) the geodetic location, gamma the meridian convergence at point, the bearing of the y-axis measured clockwise from true North and scale is the azimuthal scale of the projection at point.
  AlbersEqualArea
An Albers equal-area (authalic) projection with a single standard parallel.
  AlbersEqualArea2
An Albers equal-area (authalic) projection with two standard parallels.
  AlbersEqualArea4
An Albers equal-area (authalic) projection specified by the sin and cos of both standard parallels.
  AlbersEqualAreaCylindrical
An AlbersEqualArea projection at lat=0 and k0=1 degenerating to the cylindrical-equal-area projection.
  AlbersEqualAreaNorth
An azimuthal AlbersEqualArea projection at lat=90 and k0=1 degenerating to the azimuthal LambertEqualArea projection.
  AlbersEqualAreaSouth
An azimuthal AlbersEqualArea projection at lat=-90 and k0=1 degenerating to the azimuthal LambertEqualArea projection.
  AlbersError
An AlbersEqualArea, AlbersEqualArea2, AlbersEqualArea4, AlbersEqualAreaCylindrical, AlbersEqualAreaNorth, AlbersEqualAreaSouth or Albers7Tuple issue.
  Attitude
The orientation of a plane or camera in space.
  Attitude4Tuple
4-Tuple (alt, tilt, yaw, roll) with altitude in (positive) meter and tilt, yaw and roll in degrees representing the attitude of a plane or camera.
  AttitudeError
An Attitude or Attitude4Tuple issue.
  Azimuthal7Tuple
7-Tuple (x, y, lat, lon, azimuth, scale, datum), in meter, meter, degrees90, degrees180, compass degrees, scalar and Datum where (x, y) is the easting and northing of a projected point, (lat, lon) the geodetic location, azimuth the azimuth, clockwise from true North and scale is the projection scale, either 1 / reciprocal or 1 or -1 in the Equidistant case.
  AzimuthalError
An azimuthal Equidistant, EquidistantKarney, Gnomonic, LambertEqualArea, Orthographic, Stereographic or Azimuthal7Tuple issue.
  CSSError
Cassini-Soldner (CSS) conversion or other Css issue.
  CassiniSoldner
Cassini-Soldner projection, a Python version of Karney's C++ class CassiniSoldner.
  ChLV
Conversion between WGS84 geodetic and Swiss projection coordinates using pygeodesy3.EcefKarney's Earth-Centered, Earth-Fixed (ECEF) methods.
  ChLV9Tuple
9-Tuple (Y, X, h_, lat, lon, height, ltp, ecef, M) with unfalsed Swiss (Y, X, h_) coordinates and height, all in meter, ltp either a ChLV, ChLVa or ChLVe instance and ecef (EcefKarney at Bern, Ch), otherwise like Local9Tuple.
  ChLVEN2Tuple
2-Tuple (E_LV95, N_LV95) with falsed Swiss LV95 easting and norting in meter (2_600_000, 1_200_000) and origin at Bern, Ch.
  ChLVYX2Tuple
2-Tuple (Y, X) with unfalsed Swiss LV95 easting and norting in meter.
  ChLVa
Conversion between WGS84 geodetic and Swiss projection coordinates using the Approximate formulas, page 13.
  ChLVe
Conversion between WGS84 geodetic and Swiss projection coordinates using the Ellipsoidal approximate formulas, pp 10-11 and Bolliger, J. pp 148-151 (also GGGS).
  ChLVyx2Tuple
2-Tuple (y_LV03, x_LV03) with falsed Swiss LV03 easting and norting in meter (600_000, 200_000) and origin at Bern, Ch.
  Conic
Lambert conformal conic projection (1- or 2-SP).
  Css
Cassini-Soldner East-/Northing location.
  ETMError
Exact Transverse Mercator (ETM) parse, projection or other Etm issue or ExactTransverseMercator conversion failure.
  EasNorAziRk4Tuple
4-Tuple (easting, northing, azimuth, reciprocal) for the Cassini-Soldner location with easting and northing in meters and the azimuth of easting direction and reciprocal of azimuthal northing scale, both in degrees.
  EasNorAziRkEqu6Tuple
6-Tuple (easting, northing, azimuth, reciprocal, equatorarc, equatorazimuth) for the Cassini-Soldner location with easting and northing in meters and the azimuth of easting direction, reciprocal of azimuthal northing scale, equatorarc and equatorazimuth, all in degrees.
  EasNorRadius3Tuple
3-Tuple (easting, northing, radius), all in meter.
  Enu
Local Eeast-North-Up (ENU) location in a local tangent plane.
  Enu4Tuple
4-Tuple (east, north, up, ltp), in meter except ltp.
  Equidistant
Azimuthal equidistant projection for the sphere***, see Snyder, pp 195-197 and MathWorld-Wolfram.
  EquidistantExact
Azimuthal equidistant projection, a Python version of Karney's C++ class AzimuthalEquidistant, based on exact geodesic classes GeodesicExact and GeodesicLineExact.
  EquidistantGeodSolve
Azimuthal equidistant projection, a Python version of Karney's C++ class AzimuthalEquidistant, based on (exact) geodesic wrappers GeodesicSolve and GeodesicLineSolve and intended for testing purposes only.
  EquidistantKarney
Azimuthal equidistant projection, a Python version of Karney's C++ class AzimuthalEquidistant, requiring package geographiclib to be installed.
  Etm
Exact Transverse Mercator (ETM) coordinate, a sub-class of Utm, a Universal Transverse Mercator (UTM) coordinate using the ExactTransverseMercator projection for highest accuracy.
  ExactTransverseMercator
Pure Python version of Karney's C++ class TransverseMercatorExact, a numerically exact transverse Mercator projection, further referred to as TMExact.
  Footprint5Tuple
5-Tuple (center, upperleft, upperight, loweright, lowerleft) with the center and 4 corners of the local projection of a Frustum, each an Xyz4Tuple, XyzLocal, LatLon, etc.
  Frustum
A rectangular pyramid, typically representing a camera's field-of-view (fov) and the intersection with (or projection to) a local tangent plane.
  Gnomonic
Azimuthal gnomonic projection for the sphere***, see Snyder, pp 164-168 and MathWorld-Wolfram.
  GnomonicExact
Azimuthal gnomonic projection, a Python version of Karney's C++ class Gnomonic, based on exact geodesic classes GeodesicExact and GeodesicLineExact.
  GnomonicGeodSolve
Azimuthal gnomonic projection, a Python version of Karney's C++ class Gnomonic, based on (exact) geodesic wrappers GeodesicSolve and GeodesicLineSolve and intended for testing purposes only.
  GnomonicKarney
Azimuthal gnomonic projection, a Python version of Karney's C++ class Gnomonic, requiring package geographiclib to be installed.
  KTMError
Error raised for KTransverseMercator and KTransverseMercator.forward issues.
  KTransverseMercator
Karney's C++ class TransverseMercator transcoded to pure Python, following is a partial copy of Karney's documentation.
  LCCError
Lambert Conformal Conic LCC or other Lcc issue.
  LambertEqualArea
Lambert-equal-area projection for the sphere*** (aka Lambert zenithal equal-area projection, see Snyder, pp 185-187 and MathWorld-Wolfram.
  LatLonAziRk4Tuple
4-Tuple (lat, lon, azimuth, reciprocal), all in degrees where azimuth is the azimuth of easting direction and reciprocal the reciprocal of azimuthal northing scale.
  Lcc
Lambert conformal conic East-/Northing location.
  Local9Tuple
9-Tuple (x, y, z, lat, lon, height, ltp, ecef, M) with local x, y, z all in meter, geodetic lat, lon, height, local tangent plane ltp (Ltp), ecef (Ecef9Tuple) with geocentric x, y, z, geodetic lat, lon, height and concatenated rotation matrix M (EcefMatrix) or None.
  LocalCartesian
Conversion between geodetic (lat, lon, height) and local cartesian (x, y, z) coordinates with geodetic origin (lat0, lon0, height0), transcoded from Karney's C++ class LocalCartesian.
  LocalError
A LocalCartesian or Ltp related issue.
  Los
A Line-Of-Sight (LOS) from a LatLon or Cartesian location.
  Ltp
A local tangent plan (LTP), a sub-class of LocalCartesian with (re-)configurable ECEF converter.
  Ned
Local North-Eeast-Down (NED) location in a local tangent plane.
  Ned4Tuple
4-Tuple (north, east, down, ltp), all in meter except ltp.
  Orthographic
Orthographic projection for the sphere***, see Snyder, pp 148-153 and MathWorld-Wolfram.
  Stereographic
Stereographic projection for the sphere***, see Snyder, pp 157-160 and MathWorld-Wolfram.
  UPSError
Universal Polar Stereographic (UPS) parse or other Ups issue.
  UTMError
Universal Transverse Mercator (UTM parse or other Utm issue.
  UTMUPSError
Universal Transverse Mercator/Universal Polar Stereographic (UTM/UPS) parse, validate or other issue.
  Ups
Universal Polar Stereographic (UPS) coordinate.
  Utm
Universal Transverse Mercator (UTM) coordinate.
  Uvw
3-D u-v-w (UVW) components.
  Uvw3Tuple
3-Tuple (u, v, w), in meter.
  WebMercatorError
Web Mercator (WM) parser or Wm issue.
  Wm
Web Mercator (WM) coordinate.
  Xyz4Tuple
4-Tuple (x, y, z, ltp), all in meter except ltp.
  XyzLocal
Local (x, y, z) in a local tangent plane (LTP), also base class for local Enu.
Functions
 
UtmUps(zone, hemipole, easting, northing, band='', datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran..., falsed=True, name='')
Class-like function to create a UTM/UPS coordinate.
 
equidistant(lat0, lon0, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran..., exact=False, geodsolve=False, name='')
Return an EquidistantExact, EquidistantGeodSolve or (if Karney's geographiclib package is installed) an EquidistantKarney, otherwise an Equidistant instance.
 
gnomonic(lat0, lon0, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran..., exact=False, geodsolve=False, name='')
Return a GnomonicExact or (if Karney's geographiclib package is installed) a GnomonicKarney, otherwise a Gnomonic instance.
 
parseETM5(strUTM, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran..., Etm=<class 'pygeodesy3.projections.etm.Etm'>, falsed=True, name='')
Parse a string representing a UTM coordinate, consisting of "zone[band] hemisphere easting northing".
 
parseUPS5(strUPS, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran..., Ups=<class 'pygeodesy3.projections.ups.Ups'>, falsed=True, name='')
Parse a string representing a UPS coordinate, consisting of "[zone][band] pole easting northing" where zone is pseudo zone "00"|"0"|"" and band is 'A'|'B'|'Y'|'Z'|''.
 
parseUTM5(strUTM, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran..., Utm=<class 'pygeodesy3.projections.utm.Utm'>, falsed=True, name='')
Parse a string representing a UTM coordinate, consisting of "zone[band] hemisphere easting northing".
 
parseUTMUPS5(strUTMUPS, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran..., Utm=<class 'pygeodesy3.projections.utm.Utm'>, Ups=<class 'pygeodesy3.projections.ups.Ups'>, name='')
Parse a string representing a UTM or UPS coordinate, consisting of "zone[band] hemisphere/pole easting northing".
 
parseWM(strWM, radius=6378137.0, Wm=<class 'pygeodesy3.projections.webmercator.Wm'>, name='')
Parse a string "e n [r]" representing a WM coordinate, consisting of easting, northing and an optional radius.
 
toCss(latlon, cs0=None, height=None, Css=<class 'pygeodesy3.projections.css.Css'>, name='')
Convert an (ellipsoidal) geodetic point to a Cassini-Soldner location.
 
toEtm8(latlon, lon=None, datum=None, Etm=<class 'pygeodesy3.projections.etm.Etm'>, falsed=True, name='', strict=True, zone=None, **cmoff)
Convert a geodetic lat-/longitude to an ETM coordinate.
 
toLcc(latlon, conic=Conic(name='WRF_Lb', lat0=40, lon0=-97, par1=33, par2=45, E0=0..., height=None, Lcc=<class 'pygeodesy3.projections.lcc.Lcc'>, name='', **Lcc_kwds)
Convert an (ellipsoidal) geodetic point to a Lambert location.
 
toUps8(latlon, lon=None, datum=None, Ups=<class 'pygeodesy3.projections.ups.Ups'>, pole='', falsed=True, strict=True, name='')
Convert a lat-/longitude point to a UPS coordinate.
 
toUtm8(latlon, lon=None, datum=None, Utm=<class 'pygeodesy3.projections.utm.Utm'>, falsed=True, name='', strict=True, zone=None, **cmoff)
Convert a lat-/longitude point to a UTM coordinate.
 
toUtmUps8(latlon, lon=None, datum=None, falsed=True, Utm=<class 'pygeodesy3.projections.utm.Utm'>, Ups=<class 'pygeodesy3.projections.ups.Ups'>, pole='', name='', **cmoff)
Convert a lat-/longitude point to a UTM or UPS coordinate.
 
toWm(latlon, lon=None, earth=6378137.0, Wm=<class 'pygeodesy3.projections.webmercator.Wm'>, name='', **Wm_kwds)
Convert a lat-/longitude point to a WM coordinate.
 
tyr3d(tilt=0, yaw=0, roll=0, Vector=<class 'pygeodesy3.maths.vector3d.Vector3d'>, **Vector_kwds)
Convert an attitude oriention into a (3-D) direction vector.
 
upsZoneBand5(lat, lon, strict=True, name='')
Return the UTM/UPS zone number, polar Band letter, pole and clipped lat- and longitude for a given location.
 
utmZoneBand5(lat, lon, cmoff=False, name='')
Return the UTM zone number, Band letter, hemisphere and (clipped) lat- and longitude for a given location.
 
utmupsValidate(coord, falsed=False, MGRS=False, Error=<class 'pygeodesy3.projections.utmups.UTMUPSError'>)
Check a UTM or UPS coordinate.
 
utmupsValidateOK(coord, falsed=False, ok=True)
Check a UTM or UPS coordinate.
 
utmupsZoneBand5(lat, lon, cmoff=False, name='')
Return the UTM/UPS zone number, Band letter, hemisphere/pole and clipped lat- and longitude for a given location.
Variables
  __getattr__ = _lazy_import_as(__name__)
  Conics = Conics.WRF_Lb: Conic(name='WRF_Lb', lat0=40, lon0=-97...
Function Details

UtmUps (zone, hemipole, easting, northing, band='', datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran..., falsed=True, name='')

 

Class-like function to create a UTM/UPS coordinate.

Arguments:
  • zone - The UTM zone with/-out longitudinal Band or UPS zone 0 or "00" with/-out polar Band (str or int).
  • hemipole - UTM hemisphere or UPS top/center of projection (str, 'N[orth]' or 'S[outh]').
  • easting - Easting, see falsed (meter).
  • northing - Northing, see falsed (meter).
  • band - Optional, UTM latitudinal 'C'|'D'|..|'W'|'X' or UPS polar Band letter 'A'|'B'|'Y'|'Z' Band letter (str).
  • datum - Optional, the coordinate's datum (Datum).
  • falsed - Both easting and northing are falsed (bool).
  • name - Optional name (str).
Returns:
New UTM or UPS instance (Utm or Ups).
Raises:
  • TypeError - Invalid datum.
  • UTMUPSError - UTM or UPS validation failed.

See Also: Classes Utm and Ups and Karney's UTMUPS.

equidistant (lat0, lon0, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran..., exact=False, geodsolve=False, name='')

 

Return an EquidistantExact, EquidistantGeodSolve or (if Karney's geographiclib package is installed) an EquidistantKarney, otherwise an Equidistant instance.

Arguments:
  • lat0 - Latitude of center point (degrees90).
  • lon0 - Longitude of center point (degrees180).
  • datum - Optional datum or ellipsoid (Datum, Ellipsoid, Ellipsoid2 or a_f2Tuple) or scalar earth radius (meter).
  • exact - Return an EquidistantExact instance.
  • geodsolve - Return an EquidistantGeodSolve instance.
  • name - Optional name for the projection (str).
Returns:
An EquidistantExact, EquidistantGeodSolve, EquidistantKarney or Equidistant instance.
Raises:

gnomonic (lat0, lon0, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran..., exact=False, geodsolve=False, name='')

 

Return a GnomonicExact or (if Karney's geographiclib package is installed) a GnomonicKarney, otherwise a Gnomonic instance.

Arguments:
  • lat0 - Latitude of center point (degrees90).
  • lon0 - Longitude of center point (degrees180).
  • datum - Optional datum or ellipsoid (Datum, Ellipsoid, Ellipsoid2 or a_f2Tuple) or scalar earth radius (meter).
  • exact - Return a GnomonicExact instance.
  • geodsolve - Return a GnomonicGeodSolve instance.
  • name - Optional name for the projection (str).
Returns:
A GnomonicExact, GnomonicGeodSolve, GnomonicKarney or Gnomonic instance.
Raises:

parseETM5 (strUTM, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran..., Etm=<class 'pygeodesy3.projections.etm.Etm'>, falsed=True, name='')

 

Parse a string representing a UTM coordinate, consisting of "zone[band] hemisphere easting northing".

Arguments:
  • strUTM - A UTM coordinate (str).
  • datum - Optional datum to use (Datum, Ellipsoid, Ellipsoid2 or a_f2Tuple).
  • Etm - Optional class to return the UTM coordinate (Etm) or None.
  • falsed - Both easting and northing are falsed (bool).
  • name - Optional Etm name (str).
Returns:
The UTM coordinate (Etm) or if Etm is None, a UtmUps5Tuple(zone, hemipole, easting, northing, band). The hemipole is the hemisphere 'N'|'S'.
Raises:
  • ETMError - Invalid strUTM.
  • TypeError - Invalid or near-spherical datum.

parseUPS5 (strUPS, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran..., Ups=<class 'pygeodesy3.projections.ups.Ups'>, falsed=True, name='')

 

Parse a string representing a UPS coordinate, consisting of "[zone][band] pole easting northing" where zone is pseudo zone "00"|"0"|"" and band is 'A'|'B'|'Y'|'Z'|''.

Arguments:
  • strUPS - A UPS coordinate (str).
  • datum - Optional datum to use (Datum).
  • Ups - Optional class to return the UPS coordinate (Ups) or None.
  • falsed - Both easting and northing are falsed (bool).
  • name - Optional Ups name (str).
Returns:
The UPS coordinate (Ups) or a UtmUps5Tuple(zone, hemipole, easting, northing, band) if Ups is None. The hemipole is the 'N'|'S' pole, the UPS projection top/center.
Raises:

parseUTM5 (strUTM, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran..., Utm=<class 'pygeodesy3.projections.utm.Utm'>, falsed=True, name='')

 

Parse a string representing a UTM coordinate, consisting of "zone[band] hemisphere easting northing".

Arguments:
  • strUTM - A UTM coordinate (str).
  • datum - Optional datum to use (Datum, Ellipsoid, Ellipsoid2 or a_f2Tuple).
  • Utm - Optional class to return the UTM coordinate (Utm) or None.
  • falsed - Both easting and northing are falsed (bool).
  • name - Optional Utm name (str).
Returns:
The UTM coordinate (Utm) or if Utm is None, a UtmUps5Tuple(zone, hemipole, easting, northing, band). The hemipole is the 'N'|'S' hemisphere.
Raises:
  • UTMError - Invalid strUTM.
  • TypeError - Invalid datum.

parseUTMUPS5 (strUTMUPS, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran..., Utm=<class 'pygeodesy3.projections.utm.Utm'>, Ups=<class 'pygeodesy3.projections.ups.Ups'>, name='')

 

Parse a string representing a UTM or UPS coordinate, consisting of "zone[band] hemisphere/pole easting northing".

Arguments:
  • strUTMUPS - A UTM or UPS coordinate (str).
  • datum - Optional datum to use (Datum).
  • Utm - Optional class to return the UTM coordinate (Utm) or None.
  • Ups - Optional class to return the UPS coordinate (Ups) or None.
  • name - Optional instance name (str).
Returns:
The UTM or UPS instance (Utm or Ups) or a UtmUps5Tuple(zone, hemipole, easting, northing, band) if Utm respectively Ups or both are None. The hemipole is 'N'|'S', the UTM hemisphere or UPS pole, the UPS projection top/center.
Raises:

See Also: Functions pygeodesy3.parseUTM5 and pygeodesy3.parseUPS5.

parseWM (strWM, radius=6378137.0, Wm=<class 'pygeodesy3.projections.webmercator.Wm'>, name='')

 

Parse a string "e n [r]" representing a WM coordinate, consisting of easting, northing and an optional radius.

Arguments:
  • strWM - A WM coordinate (str).
  • radius - Optional earth radius (meter), needed in case strWM doesn't include r.
  • Wm - Optional class to return the WM coordinate (Wm) or None.
  • name - Optional name (str).
Returns:
The WM coordinate (Wm) or an EasNorRadius3Tuple(easting, northing, radius) if Wm is None.
Raises:

toCss (latlon, cs0=None, height=None, Css=<class 'pygeodesy3.projections.css.Css'>, name='')

 

Convert an (ellipsoidal) geodetic point to a Cassini-Soldner location.

Arguments:
  • latlon - Ellipsoidal point (LatLon or LatLon4Tuple).
  • cs0 - Optional, the Cassini-Soldner projection to use (CassiniSoldner).
  • height - Optional height for the point, overriding the default height (meter).
  • Css - Optional class to return the location (Css) or None.
  • name - Optional Css name (str).
Returns:
The Cassini-Soldner location (Css) or an EasNor3Tuple(easting, northing, height) if Css is None.
Raises:
  • CSSError - Ellipsoidal mismatch of latlon and cs0.
  • ImportError - Package geographiclib not installed or not found.
  • TypeError - If latlon is not ellipsoidal.

toEtm8 (latlon, lon=None, datum=None, Etm=<class 'pygeodesy3.projections.etm.Etm'>, falsed=True, name='', strict=True, zone=None, **cmoff)

 

Convert a geodetic lat-/longitude to an ETM coordinate.

Arguments:
  • latlon - Latitude (degrees) or an (ellipsoidal) geodetic LatLon instance.
  • lon - Optional longitude (degrees) or None.
  • datum - Optional datum for the ETM coordinate, overriding latlon's datum (Datum, Ellipsoid, Ellipsoid2 or a_f2Tuple).
  • Etm - Optional class to return the ETM coordinate (Etm) or None.
  • falsed - False both easting and northing (bool).
  • name - Optional Utm name (str).
  • strict - Restrict lat to UTM ranges (bool).
  • zone - Optional UTM zone to enforce (int or str).
  • cmoff - DEPRECATED, use falsed. Offset longitude from the zone's central meridian (bool).
Returns:
The ETM coordinate as an Etm instance or a UtmUps8Tuple(zone, hemipole, easting, northing, band, datum, gamma, scale) if Etm is None or not falsed. The hemipole is the 'N'|'S' hemisphere.
Raises:
  • ETMError - No convergence transforming to ETM easting and northing.
  • ETMError - Invalid zone or near-spherical or incompatible datum or ellipsoid.
  • RangeError - If lat outside the valid UTM bands or if lat or lon outside the valid range and pygeodesy3.rangerrors set to True.
  • TypeError - Invalid or near-spherical datum or latlon not ellipsoidal.
  • ValueError - The lon value is missing or latlon is invalid.

toLcc (latlon, conic=Conic(name='WRF_Lb', lat0=40, lon0=-97, par1=33, par2=45, E0=0..., height=None, Lcc=<class 'pygeodesy3.projections.lcc.Lcc'>, name='', **Lcc_kwds)

 

Convert an (ellipsoidal) geodetic point to a Lambert location.

Arguments:
  • latlon - Ellipsoidal point (LatLon).
  • conic - Optional Lambert projection to use (Conic).
  • height - Optional height for the point, overriding the default height (meter).
  • Lcc - Optional class to return the Lambert location (Lcc).
  • name - Optional Lcc name (str).
  • Lcc_kwds - Optional, additional Lcc keyword arguments, ignored if Lcc is None.
Returns:
The Lambert location (Lcc) or an EasNor3Tuple(easting, northing, height) if Lcc is None.
Raises:
  • TypeError - If latlon is not ellipsoidal.

toUps8 (latlon, lon=None, datum=None, Ups=<class 'pygeodesy3.projections.ups.Ups'>, pole='', falsed=True, strict=True, name='')

 

Convert a lat-/longitude point to a UPS coordinate.

Arguments:
  • latlon - Latitude (degrees) or an (ellipsoidal) geodetic LatLon point.
  • lon - Optional longitude (degrees) or None if latlon is a LatLon.
  • datum - Optional datum for this UPS coordinate, overriding latlon's datum (Datum, Ellipsoid, Ellipsoid2 or a_f2Tuple).
  • Ups - Optional class to return the UPS coordinate (Ups) or None.
  • pole - Optional top/center of (stereographic) projection (str, 'N[orth]' or 'S[outh]').
  • falsed - False both easting and northing (bool).
  • strict - Restrict lat to UPS ranges (bool).
  • name - Optional Ups name (str).
Returns:
The UPS coordinate (Ups) or a UtmUps8Tuple(zone, hemipole, easting, northing, band, datum, gamma, scale) if Ups is None. The hemipole is the 'N'|'S' pole, the UPS projection top/center.
Raises:
  • RangeError - If strict and lat outside the valid UPS bands or if lat or lon outside the valid range and pygeodesy3.rangerrors set to True.
  • TypeError - If latlon is not ellipsoidal or datum invalid.
  • ValueError - If lon value is missing or if latlon is invalid.

See Also: Karney's C++ class UPS.

toUtm8 (latlon, lon=None, datum=None, Utm=<class 'pygeodesy3.projections.utm.Utm'>, falsed=True, name='', strict=True, zone=None, **cmoff)

 

Convert a lat-/longitude point to a UTM coordinate.

Arguments:
  • latlon - Latitude (degrees) or an (ellipsoidal) geodetic LatLon point.
  • lon - Optional longitude (degrees) or None.
  • datum - Optional datum for this UTM coordinate, overriding latlon's datum (Datum, Ellipsoid, Ellipsoid2 or a_f2Tuple).
  • Utm - Optional class to return the UTM coordinate (Utm) or None.
  • falsed - False both easting and northing (bool).
  • name - Optional Utm name (str).
  • strict - Restrict lat to UTM ranges (bool).
  • zone - Optional UTM zone to enforce (int or str).
  • cmoff - DEPRECATED, use falsed. Offset longitude from the zone's central meridian (bool).
Returns:
The UTM coordinate (Utm) or if Utm is None or not falsed, a UtmUps8Tuple(zone, hemipole, easting, northing, band, datum, gamma, scale). The hemipole is the 'N'|'S' hemisphere.
Raises:
  • RangeError - If lat outside the valid UTM bands or if lat or lon outside the valid range and pygeodesy3.rangerrors set to True.
  • TypeError - Invalid datum or latlon not ellipsoidal.
  • UTMError - Invalid zone.
  • ValueError - If lon value is missing or if latlon is invalid.

Note: Implements Karney’s method, using 8-th order Krüger series, giving results accurate to 5 nm (or better) for distances up to 3,900 Km from the central meridian.

toUtmUps8 (latlon, lon=None, datum=None, falsed=True, Utm=<class 'pygeodesy3.projections.utm.Utm'>, Ups=<class 'pygeodesy3.projections.ups.Ups'>, pole='', name='', **cmoff)

 

Convert a lat-/longitude point to a UTM or UPS coordinate.

Arguments:
  • latlon - Latitude (degrees) or an (ellipsoidal) geodetic LatLon point.
  • lon - Optional longitude (degrees) or None.
  • datum - Optional datum to use this UTM coordinate, overriding latlon's datum (Datum).
  • falsed - False both easting and northing (bool).
  • Utm - Optional class to return the UTM coordinate (Utm) or None.
  • Ups - Optional class to return the UPS coordinate (Ups) or None.
  • pole - Optional top/center of UPS (stereographic) projection (str, 'N[orth]' or 'S[outh]').
  • name - Optional name (str).
  • cmoff - DEPRECATED, use falsed. Offset longitude from zone's central meridian, for UTM only (bool).
Returns:
The UTM or UPS coordinate (Utm respectively Ups) or a UtmUps8Tuple(zone, hemipole, easting, northing, band, datum, gamma, scale) if Utm respectively Ups is None or cmoff is False.
Raises:
  • RangeError - If lat outside the valid UTM or UPS bands or if lat or lon outside the valid range and pygeodesy3.rangerrors set to True.
  • TypeError - If latlon is not ellipsoidal or lon value is missing of datum is invalid.
  • UTMUPSError - UTM or UPS validation failed.
  • ValueError - Invalid lat or lon.

See Also: Functions pygeodesy3.toUtm8 and pygeodesy3.toUps8.

toWm (latlon, lon=None, earth=6378137.0, Wm=<class 'pygeodesy3.projections.webmercator.Wm'>, name='', **Wm_kwds)

 

Convert a lat-/longitude point to a WM coordinate.

Arguments:
  • latlon - Latitude (degrees) or an (ellipsoidal or spherical) geodetic LatLon point.
  • lon - Optional longitude (degrees or None).
  • earth - Earth radius (meter), datum or ellipsoid (Datum, a_f2Tuple, Ellipsoid or Ellipsoid2), overridden by latlon's datum if present.
  • Wm - Optional class to return the WM coordinate (Wm) or None.
  • name - Optional name (str).
  • Wm_kwds - Optional, additional Wm keyword arguments, ignored if Wm is None.
Returns:
The WM coordinate (Wm) or if Wm is None an EasNorRadius3Tuple(easting, northing, radius).
Raises:
  • ValueError - If lon value is missing, if latlon is not scalar, if latlon is beyond the valid WM range and pygeodesy3.rangerrors is set to True or if earth is invalid.

tyr3d (tilt=0, yaw=0, roll=0, Vector=<class 'pygeodesy3.maths.vector3d.Vector3d'>, **Vector_kwds)

 

Convert an attitude oriention into a (3-D) direction vector.

Arguments:
  • tilt - Pitch, elevation from horizontal (degrees), negative down (clockwise rotation along and around the x-axis).
  • yaw - Bearing, heading (compass degrees360), clockwise from North (counter-clockwise rotation along and around the z-axis).
  • roll - Roll, bank (degrees), positive to the right and down (clockwise rotation along and around the y-axis).
Returns:
A named Vector instance or if Vector is None, a named Vector3Tuple(x, y, z).

See Also: Yaw, pitch, and roll rotations and function pygeodesy3.hartzell argument los.

upsZoneBand5 (lat, lon, strict=True, name='')

 

Return the UTM/UPS zone number, polar Band letter, pole and clipped lat- and longitude for a given location.

Arguments:
  • lat - Latitude in degrees (scalar or str).
  • lon - Longitude in degrees (scalar or str).
  • strict - Restrict lat to UPS ranges (bool).
  • name - Optional name (str).
Returns:
A UtmUpsLatLon5Tuple(zone, band, hemipole, lat, lon) where hemipole is the 'N'|'S' pole, the UPS projection top/center and lon [-180..180).
Raises:
  • RangeError - If strict and lat in the UTM and not the UPS range or if lat or lon outside the valid range and pygeodesy3.rangerrors set to True.
  • ValueError - Invalid lat or lon.

Note: The lon is set to 0 if lat is -90 or 90, see env variable PYGEODESY3_UPS_POLES in module pygeodesy3.projections.ups.

utmZoneBand5 (lat, lon, cmoff=False, name='')

 

Return the UTM zone number, Band letter, hemisphere and (clipped) lat- and longitude for a given location.

Arguments:
  • lat - Latitude in degrees (scalar or str).
  • lon - Longitude in degrees (scalar or str).
  • cmoff - Offset longitude from the zone's central meridian (bool).
  • name - Optional name (str).
Returns:
A UtmUpsLatLon5Tuple(zone, band, hemipole, lat, lon) where hemipole is the 'N'|'S' UTM hemisphere.
Raises:
  • RangeError - If lat outside the valid UTM bands or if lat or lon outside the valid range and pygeodesy3.rangerrors set to True.
  • ValueError - Invalid lat or lon.

utmupsValidate (coord, falsed=False, MGRS=False, Error=<class 'pygeodesy3.projections.utmups.UTMUPSError'>)

 

Check a UTM or UPS coordinate.

Arguments:
  • coord - The UTM or UPS coordinate (Utm, Etm, Ups or 5+Tuple).
  • falsed - 5+Tuple easting and northing are falsed (bool), ignored otherwise.
  • MGRS - Increase easting and northing ranges (bool).
  • Error - Optional error to raise, overriding the default (UTMUPSError).
Returns:
None if validation passed.
Raises:
  • Error - Validation failed.

See Also: Function utmupsValidateOK.

utmupsValidateOK (coord, falsed=False, ok=True)

 

Check a UTM or UPS coordinate.

Arguments:
  • coord - The UTM or UPS coordinate (Utm, Ups or 5+Tuple).
  • falsed - 5+Tuple easting and northing are falsed (bool).
  • ok - Result to return if validation passed (ok).
Returns:
ok if validation passed, the UTMUPSError otherwise.

See Also: Function utmupsValidate.

utmupsZoneBand5 (lat, lon, cmoff=False, name='')

 

Return the UTM/UPS zone number, Band letter, hemisphere/pole and clipped lat- and longitude for a given location.

Arguments:
  • lat - Latitude in degrees (scalar or str).
  • lon - Longitude in degrees (scalar or str).
  • cmoff - Offset longitude from the zone's central meridian, for UTM only (bool).
  • name - Optional name (str).
Returns:
A UtmUpsLatLon5Tuple(zone, band, hemipole, lat, lon) where hemipole is 'N'|'S', the UTM hemisphere or UPS pole, the UPS projection top/center.
Raises:
  • RangeError - If lat outside the valid UTM or UPS bands or if lat or lon outside the valid range and pygeodesy3.rangerrors set to True.
  • ValueError - Invalid lat or lon.

Variables Details

Conics

Value:
Conics.WRF_Lb: Conic(name='WRF_Lb', lat0=40, lon0=-97, par1=33, par2=4\
5, E0=0, N0=0, k0=1, SP=2, datum=Datum(name='WGS84', ellipsoid=Ellipso\
ids.WGS84, transform=Transforms.WGS84))