wradlib.georef.projection.GeorefProjectionMethods#

class wradlib.georef.projection.GeorefProjectionMethods[source]#

Bases: object

wradlib xarray SubAccessor methods for Georef Projection Methods.

get_earth_radius(*, sr=None)[source]#

Get the radius of the Earth (in km) for a given Spheroid model (sr) at a given position.

\[R^2 = \frac{a^4 \cos(f)^2 + b^4 \sin(f)^2} {a^2 \cos(f)^2 + b^2 \sin(f)^2}\]
Parameters:
Returns:

radius (float) – earth radius in meter

reproject(**kwargs)[source]#

Transform coordinates from current projection to a target projection.

Parameters:

obj (xarray.DataArray | xarray.Dataset)

Keyword Arguments:
  • trg_crs (osgeo.osr.SpatialReference) –

  • coords (dict, optional) – Mapping of coordinates. Defaults to None

  • area_of_interest (tuple) – floats (WestLongitudeDeg, SouthLatitudeDeg, EastLongitudeDeg, NorthLatitudeDeg), defaults to None (no area of interest).

Returns:

obj (xarray.DataArray | xarray.Dataset) – reprojected Dataset/DataArray

Examples

See Example for georeferencing a radar dataset.

get_earth_radius(*[, sr])

Get the radius of the Earth (in km) for a given Spheroid model (sr) at a given position.

reproject(**kwargs)

Transform coordinates from current projection to a target projection.