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:
obj (
xarray.DataArray
|xarray.Dataset
)sr (
osgeo.osr.SpatialReference
) – spatial reference
- 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 Nonearea_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
|
Get the radius of the Earth (in km) for a given Spheroid model (sr) at a given position. |
|
Transform coordinates from current projection to a target projection. |