# pyresample.utils.proj4 module

Utilities for working with projection parameters.

class pyresample.utils.proj4.DaskFriendlyTransformer(src_crs, dst_crs, **kwargs)

  Bases: `object`

  Wrapper around the pyproj Transformer class that uses dask.

  If the provided arrays are not dask arrays, they are converted to numpy arrays and pyproj will be called directly (dask is not used).

  Initialize the transformer with CRS objects.

  This method should not be used directly, just like pyproj.Transformer should not be created directly.

  __init__(src_crs, dst_crs, **kwargs)

    Initialize the transformer with CRS objects.

    This method should not be used directly, just like pyproj.Transformer should not be created directly.

  classmethod from_crs(crs_from, crs_to, **kwargs)

    Create transformer object from two CRS objects.

  transform(x, y, z=None, **kwargs)

    Transform coordinates.

pyresample.utils.proj4.convert_proj_floats(proj_pairs)

  Convert PROJ.4 parameters to floats if possible.

pyresample.utils.proj4.get_geodetic_crs_with_no_datum_shift(crs)

  Get the geodetic CRS for the provided CRS but with no prime meridian shift.

  Return type:

    `CRS`

pyresample.utils.proj4.get_geostationary_height(geos_area_crs)

  Get the height parameter from a geostationary CRS.

pyresample.utils.proj4.ignore_pyproj_proj_warnings()

  Wrap operations that we know will produce a PROJ.4 precision warning.

  Only to be used internally to Pyresample when we have no other choice but to use PROJ.4 strings/dicts. For example, serialization to YAML or other human-readable formats or testing the methods that produce the PROJ.4 versions of the CRS.

pyresample.utils.proj4.proj4_dict_to_str(proj4_dict, sort=False)

  Convert a dictionary of PROJ.4 parameters to a valid PROJ.4 string.

pyresample.utils.proj4.proj4_radius_parameters(proj4_dict)

  Calculate ‘a’ and ‘b’ radius parameters.

  Parameters:

    proj4_dict (str or dict) – PROJ.4 parameters

  Returns:

    equatorial and polar radius

  Return type:

    a (float), b (float)

pyresample.utils.proj4.proj4_str_to_dict(proj4_str)

  Convert PROJ.4 compatible string definition to dict.

  EPSG codes should be provided as “EPSG:XXXX” where “XXXX” is the EPSG number code. It can also be provided as `"+init=EPSG:XXXX"` as long as the underlying PROJ library supports it (deprecated in PROJ 6.0+).

  Note: Key only parameters will be assigned a value of True.