epygram.myproj — Projection tools

Deprecated since version 0.4.6: Package pyproj should be used instead.

This module has been developped as a temporary alternative to :mod`pyproj`. Its usage is deprecated: it may be removed from the package in a future version.

class epygram.myproj.Proj(proj, geoidshape='sphere', geoidradius=6371229.0, x_0=0.0, y_0=0.0, **proj_params)[source]

Bases: epygram.util.RecursiveObject

A class of homemade projections on the sphere, made to handle cases not handled by pyproj (e.g. sphere geoid for polar stereographic projection...).

__call__(x, y, inverse=False)[source]

Converts lon/lat coordinates (in °) to x/y coord in the projection.

If inverse is True, makes the inverse conversion, from x/y to lon/lat (in °).

__init__(proj, geoidshape='sphere', geoidradius=6371229.0, x_0=0.0, y_0=0.0, **proj_params)[source]

Initializes parameters for projection formulas.

Args:

  • proj: name of the projection, among (‘lambert’, ‘mercator’, ‘polar_stereographic’)

  • geoidshape: actually, only ‘sphere’ is implemented.

  • earth_radius: can be specified, to use a specific earth radius, in m.

  • x_0, y_0 : offset of Origin in (x, y) coordinates of projected map.

  • proj_params: a set of arguments that depends on the projection. (all lon/lat are in degrees):

    • lambert: lon_0 = longitude of reference point

      lat_1 = first secant latitude

      lat_2 = second secant latitude

      if tangent, lat_1 = lat_2 = lat_0 = latitude of reference point = tangency latitude

    • mercator: lon_0 = longitude of reference point

      lat_ts = tangency latitude (0°) or secant latitude

    • polar_stereographic: lon_0 = longitude of reference point

      lat_0 = +/- 90° depending on the projection pole lat_ts = secant or tangency latitude

Previous topic

epygram.resources — Real and virtual resources handling

Next topic

epygram.profiles — Functions on vertical profiles

This Page